From a8b8c1d1e43b942165f228b06b54443455c3c70a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikkel=20H=C3=B8jlund=20Larsen?= Date: Tue, 8 Oct 2024 12:42:17 +0200 Subject: [PATCH] update workflow and fix tests --- .github/workflows/python-waf.yml | 2 +- test/add_dependency/app/wscript | 2 ++ test/add_dependency/libbar/wscript | 3 +++ test/add_dependency/libbaz/wscript | 3 +++ test/add_dependency/libextra/wscript | 2 ++ test/add_dependency/libfoo/wscript | 3 +++ test/existing_tag/app/wscript | 2 ++ test/existing_tag/libbaz/wscript | 18 ++++++++++-------- test/fail_recurse/wscript | 7 +++++-- test/fail_recurse/wscript_build_python_error | 9 +++++++-- test/fail_recurse/wscript_build_waf_error | 9 +++++++-- .../wscript_configure_python_error | 8 ++++++-- test/fail_recurse/wscript_configure_waf_error | 8 ++++++-- test/pull_submodules/app/wscript | 2 ++ test/pull_submodules/libbaz/wscript | 17 +++++++++-------- 15 files changed, 68 insertions(+), 27 deletions(-) diff --git a/.github/workflows/python-waf.yml b/.github/workflows/python-waf.yml index c47bc0c2..06cc590a 100644 --- a/.github/workflows/python-waf.yml +++ b/.github/workflows/python-waf.yml @@ -14,7 +14,7 @@ name: Waf Python Tests jobs: waf-linux: container: - image: ghcr.io/steinwurf/waf:latest + image: python:3.12 options: --user 0:0 volumes: - /home/buildbot/.ssh:/root/.ssh diff --git a/test/add_dependency/app/wscript b/test/add_dependency/app/wscript index cd398a89..62740113 100644 --- a/test/add_dependency/app/wscript +++ b/test/add_dependency/app/wscript @@ -8,6 +8,8 @@ from fake_git import FakeGit APPNAME = "test_add_dependency" VERSION = "1.0.0" +NO_RECURSE = False + def resolve(ctx): # Get the registry and replace the git builder diff --git a/test/add_dependency/libbar/wscript b/test/add_dependency/libbar/wscript index 82dfd5eb..4bfdfb7e 100644 --- a/test/add_dependency/libbar/wscript +++ b/test/add_dependency/libbar/wscript @@ -5,6 +5,9 @@ APPNAME = "libbar" VERSION = "1.0.0" +NO_RECURSE = False + + def options(opt): opt.load("compiler_cxx") diff --git a/test/add_dependency/libbaz/wscript b/test/add_dependency/libbaz/wscript index 4192d258..ff42e926 100644 --- a/test/add_dependency/libbaz/wscript +++ b/test/add_dependency/libbaz/wscript @@ -5,6 +5,9 @@ APPNAME = "libbaz" VERSION = "1.0.0" +NO_RECURSE = False + + def resolve(ctx): pass diff --git a/test/add_dependency/libextra/wscript b/test/add_dependency/libextra/wscript index 91158e46..26570221 100644 --- a/test/add_dependency/libextra/wscript +++ b/test/add_dependency/libextra/wscript @@ -3,6 +3,8 @@ VERSION = "1.0.0" +NO_RECURSE = False + def build(bld): bld(export_includes="./src", name="extra") diff --git a/test/add_dependency/libfoo/wscript b/test/add_dependency/libfoo/wscript index e2d66641..3ddd196b 100644 --- a/test/add_dependency/libfoo/wscript +++ b/test/add_dependency/libfoo/wscript @@ -4,6 +4,9 @@ VERSION = "1.0.0" +NO_RECURSE = False + + def options(opt): opts = opt.add_option_group("Foo options") opts.add_option( diff --git a/test/existing_tag/app/wscript b/test/existing_tag/app/wscript index 26a442c9..5a098715 100644 --- a/test/existing_tag/app/wscript +++ b/test/existing_tag/app/wscript @@ -6,6 +6,8 @@ from fake_git import FakeGit APPNAME = "test_add_dependency" VERSION = "1.0.0" +NO_RECURSE = False + def resolve(ctx): # Get the registry and replace the git builder diff --git a/test/existing_tag/libbaz/wscript b/test/existing_tag/libbaz/wscript index b23636b1..ff42e926 100644 --- a/test/existing_tag/libbaz/wscript +++ b/test/existing_tag/libbaz/wscript @@ -1,8 +1,11 @@ #! /usr/bin/env python # encoding: utf-8 -APPNAME = 'libbaz' -VERSION = '1.0.0' +APPNAME = "libbaz" +VERSION = "1.0.0" + + +NO_RECURSE = False def resolve(ctx): @@ -10,15 +13,14 @@ def resolve(ctx): def options(opt): - opt.load('compiler_cxx') + opt.load("compiler_cxx") def configure(conf): - conf.load('compiler_cxx') + conf.load("compiler_cxx") def build(bld): - bld.stlib(features='cxx', - target='baz', - source='src/baz/baz.cpp', - export_includes='src') + bld.stlib( + features="cxx", target="baz", source="src/baz/baz.cpp", export_includes="src" + ) diff --git a/test/fail_recurse/wscript b/test/fail_recurse/wscript index a3ad9ef7..991b838b 100644 --- a/test/fail_recurse/wscript +++ b/test/fail_recurse/wscript @@ -1,8 +1,11 @@ #! /usr/bin/env python # encoding: utf-8 -APPNAME = 'fail_recurse' -VERSION = '1.0.0' +APPNAME = "fail_recurse" +VERSION = "1.0.0" + + +NO_RECURSE = False def resolve(ctx): diff --git a/test/fail_recurse/wscript_build_python_error b/test/fail_recurse/wscript_build_python_error index 769d0741..f30f1ae3 100644 --- a/test/fail_recurse/wscript_build_python_error +++ b/test/fail_recurse/wscript_build_python_error @@ -1,11 +1,16 @@ #! /usr/bin/env python # encoding: utf-8 -APPNAME = 'foo' -VERSION = '1.0.0' +APPNAME = "foo" +VERSION = "1.0.0" + + +NO_RECURSE = False + def configure(conf): pass + def build(conf): raise RuntimeError("Oh no!") diff --git a/test/fail_recurse/wscript_build_waf_error b/test/fail_recurse/wscript_build_waf_error index 821c1554..771e69b9 100644 --- a/test/fail_recurse/wscript_build_waf_error +++ b/test/fail_recurse/wscript_build_waf_error @@ -3,11 +3,16 @@ import waflib -APPNAME = 'foo' -VERSION = '1.0.0' +APPNAME = "foo" +VERSION = "1.0.0" + + +NO_RECURSE = False + def configure(conf): pass + def build(bld): raise waflib.Errors.WafError("Oh no!") diff --git a/test/fail_recurse/wscript_configure_python_error b/test/fail_recurse/wscript_configure_python_error index 5a374180..d3090d4e 100644 --- a/test/fail_recurse/wscript_configure_python_error +++ b/test/fail_recurse/wscript_configure_python_error @@ -1,8 +1,12 @@ #! /usr/bin/env python # encoding: utf-8 -APPNAME = 'foo' -VERSION = '1.0.0' +APPNAME = "foo" +VERSION = "1.0.0" + + +NO_RECURSE = False + def configure(conf): raise RuntimeError("Oh no!") diff --git a/test/fail_recurse/wscript_configure_waf_error b/test/fail_recurse/wscript_configure_waf_error index 2c130daf..857de7ac 100644 --- a/test/fail_recurse/wscript_configure_waf_error +++ b/test/fail_recurse/wscript_configure_waf_error @@ -3,8 +3,12 @@ import waflib -APPNAME = 'foo' -VERSION = '1.0.0' +APPNAME = "foo" +VERSION = "1.0.0" + + +NO_RECURSE = False + def configure(conf): raise waflib.Errors.WafError("Oh no!") diff --git a/test/pull_submodules/app/wscript b/test/pull_submodules/app/wscript index dcc1841f..b660e07d 100644 --- a/test/pull_submodules/app/wscript +++ b/test/pull_submodules/app/wscript @@ -7,6 +7,8 @@ from fake_git import FakeGit APPNAME = "test_add_dependency" VERSION = "1.0.0" +NO_RECURSE = False + def resolve(ctx): diff --git a/test/pull_submodules/libbaz/wscript b/test/pull_submodules/libbaz/wscript index b23636b1..21e36822 100644 --- a/test/pull_submodules/libbaz/wscript +++ b/test/pull_submodules/libbaz/wscript @@ -1,8 +1,10 @@ #! /usr/bin/env python # encoding: utf-8 -APPNAME = 'libbaz' -VERSION = '1.0.0' +APPNAME = "libbaz" +VERSION = "1.0.0" + +NO_RECURSE = False def resolve(ctx): @@ -10,15 +12,14 @@ def resolve(ctx): def options(opt): - opt.load('compiler_cxx') + opt.load("compiler_cxx") def configure(conf): - conf.load('compiler_cxx') + conf.load("compiler_cxx") def build(bld): - bld.stlib(features='cxx', - target='baz', - source='src/baz/baz.cpp', - export_includes='src') + bld.stlib( + features="cxx", target="baz", source="src/baz/baz.cpp", export_includes="src" + )