diff options
37 files changed, 53 insertions, 201 deletions
diff --git a/tests/cachekey/project/elements/build1.expected b/tests/cachekey/project/elements/build1.expected index 82f2724c0..8d5e512e1 100644 --- a/tests/cachekey/project/elements/build1.expected +++ b/tests/cachekey/project/elements/build1.expected @@ -1 +1 @@ -f5ae62830a4daf855d76c4f18477691cdd90094d5cff1cb08192516c72cea1fc
\ No newline at end of file +177087943bbb477db3b500b7f81231175534d89a55340e6772296188e645d21e
\ No newline at end of file diff --git a/tests/cachekey/project/elements/compose1.expected b/tests/cachekey/project/elements/compose1.expected index 9d7c5f810..e47c258d3 100644 --- a/tests/cachekey/project/elements/compose1.expected +++ b/tests/cachekey/project/elements/compose1.expected @@ -1 +1 @@ -194d862b892e02e6b2bb381348ce6a9554d0926504f414b5cd088e0dfccfd1a4 +197704abb7bfc136fe2567938c357043c69e0f48ce336842e7d18f9784319a5e
\ No newline at end of file diff --git a/tests/cachekey/project/elements/compose2.expected b/tests/cachekey/project/elements/compose2.expected index 66fe2d6d2..d7832cb36 100644 --- a/tests/cachekey/project/elements/compose2.expected +++ b/tests/cachekey/project/elements/compose2.expected @@ -1 +1 @@ -600d9d55bef2395a79d7572239b22948a7562f7140b97a772c2c37ed0488e6e4 +f658b0cdcb5841c16ac6372724e7ae969bbf85b084e4ffc127136c6cc374842f
\ No newline at end of file diff --git a/tests/cachekey/project/elements/compose3.expected b/tests/cachekey/project/elements/compose3.expected index 4df94ff57..66c88a6a6 100644 --- a/tests/cachekey/project/elements/compose3.expected +++ b/tests/cachekey/project/elements/compose3.expected @@ -1 +1 @@ -a3ef7016ed336e599a425f018999f415ffcb933c27c0c2e2fa6928792f5164d6 +4c4109ab5e667da04104fc80d4d5d3dca38fcf0074ce7301f59485767b875ef3
\ No newline at end of file diff --git a/tests/cachekey/project/elements/compose4.expected b/tests/cachekey/project/elements/compose4.expected index 519ffcbe7..150357368 100644 --- a/tests/cachekey/project/elements/compose4.expected +++ b/tests/cachekey/project/elements/compose4.expected @@ -1 +1 @@ -c28e9cd8d1b0ee9f146e61e105a23c9cea63ee3ecec2f9fa32782fdb77bfda0b +1197dc0edf0287d68bf3d522a0a537cce0a47be3cacbe3250061307cfabc2811
\ No newline at end of file diff --git a/tests/cachekey/project/elements/compose5.expected b/tests/cachekey/project/elements/compose5.expected index 0fef2f012..4b98226ac 100644 --- a/tests/cachekey/project/elements/compose5.expected +++ b/tests/cachekey/project/elements/compose5.expected @@ -1 +1 @@ -fe2f6a3a708fc0b1c6cd3eec392a64f0c80d96ddf13276796ac253295801461e +5ff99ec5fa1b16dc4222183510d07d666c50c6ba9fab82d48c52da470a26702b
\ No newline at end of file diff --git a/tests/cachekey/project/elements/import1.expected b/tests/cachekey/project/elements/import1.expected index 030c0fef3..7759e793e 100644 --- a/tests/cachekey/project/elements/import1.expected +++ b/tests/cachekey/project/elements/import1.expected @@ -1 +1 @@ -ffc58366eca61e646beb150556f384fb7c1402e40f3d00e942e6bf1fdfaf0301 +5c5554504aaefb270ba25c501cc52af6b605865ca99ab53adb199ea101981d2b
\ No newline at end of file diff --git a/tests/cachekey/project/elements/import2.expected b/tests/cachekey/project/elements/import2.expected index b79f3de98..2a4d63c10 100644 --- a/tests/cachekey/project/elements/import2.expected +++ b/tests/cachekey/project/elements/import2.expected @@ -1 +1 @@ -d00f3bb38c84ef55da3542375f2cecdb0d90198cbadc2f747fb99ea68a27e200 +c21db73188bc50d652ac39c581181c17615f05afe81e5ffacb64d5086f97da75
\ No newline at end of file diff --git a/tests/cachekey/project/elements/import3.expected b/tests/cachekey/project/elements/import3.expected index 3538aa442..75fadf0d6 100644 --- a/tests/cachekey/project/elements/import3.expected +++ b/tests/cachekey/project/elements/import3.expected @@ -1 +1 @@ -e1698af5efa11881854855dc6f6d7510d5fecbf583902cb46cc1d780fc07e80f +a4921dce2013afab2020eacbc7f01e476d695aaddbc2b6b1a29af65c0a39d5b8
\ No newline at end of file diff --git a/tests/cachekey/project/elements/script1.expected b/tests/cachekey/project/elements/script1.expected index 2509aa0c7..a0dec66c2 100644 --- a/tests/cachekey/project/elements/script1.expected +++ b/tests/cachekey/project/elements/script1.expected @@ -1 +1 @@ -edc3b8143d2f076476630b2e3e2bf84c5386b7a3c30f9113dd2999406495006a +b282e855c3efc67c5869b4012603a869cfa3a425e06dedd98d2ceb3a02de65e3
\ No newline at end of file diff --git a/tests/cachekey/project/sources/bzr1.expected b/tests/cachekey/project/sources/bzr1.expected index b43ef80be..c5d7ace1f 100644 --- a/tests/cachekey/project/sources/bzr1.expected +++ b/tests/cachekey/project/sources/bzr1.expected @@ -1 +1 @@ -ee6aa4e7cff93613d9d6ae600b425aee22fd01565e9d6ff8fc7e975c5f7dd9fc +5b41eca4e0737fdfdd1424eb3662c2124f79993bf6dea97a4462e3f4df9b0d3d
\ No newline at end of file diff --git a/tests/cachekey/project/sources/git1.expected b/tests/cachekey/project/sources/git1.expected index fe3d4ce49..0776100d2 100644 --- a/tests/cachekey/project/sources/git1.expected +++ b/tests/cachekey/project/sources/git1.expected @@ -1 +1 @@ -b1e1dae047d021ffeba8fbde26feedc06795118c47a84576c0ec6d6192ea00f1 +8a6cdbcbf6185d446f8d55d994356d59962539f7f671e3ebb11d11d61c160d65
\ No newline at end of file diff --git a/tests/cachekey/project/sources/git2.expected b/tests/cachekey/project/sources/git2.expected index 1165ee4a0..7d1c2a601 100644 --- a/tests/cachekey/project/sources/git2.expected +++ b/tests/cachekey/project/sources/git2.expected @@ -1 +1 @@ -0fbf16eba619d337738e057c27b85c6ea46c806d51bf7eab713a6d6d6fc47b86 +852b917a6e28abb53e1f2a04fc277d8f8fc1072b0561aade3550fcc90dfa5af3
\ No newline at end of file diff --git a/tests/cachekey/project/sources/local1.expected b/tests/cachekey/project/sources/local1.expected index 030c0fef3..7759e793e 100644 --- a/tests/cachekey/project/sources/local1.expected +++ b/tests/cachekey/project/sources/local1.expected @@ -1 +1 @@ -ffc58366eca61e646beb150556f384fb7c1402e40f3d00e942e6bf1fdfaf0301 +5c5554504aaefb270ba25c501cc52af6b605865ca99ab53adb199ea101981d2b
\ No newline at end of file diff --git a/tests/cachekey/project/sources/local2.expected b/tests/cachekey/project/sources/local2.expected index ad0217e00..f599f848e 100644 --- a/tests/cachekey/project/sources/local2.expected +++ b/tests/cachekey/project/sources/local2.expected @@ -1 +1 @@ -8be1a257203e26d42b44e896dad7cffae40ae05d6cfe7d01c81013502128129f +199fdb2732acb5dc7de0c50d76ff305a933352c04cde9ba2680c2eedf68b0d08
\ No newline at end of file diff --git a/tests/cachekey/project/sources/ostree1.expected b/tests/cachekey/project/sources/ostree1.expected index 7bc578891..976d577af 100644 --- a/tests/cachekey/project/sources/ostree1.expected +++ b/tests/cachekey/project/sources/ostree1.expected @@ -1 +1 @@ -7bdd3f66591af855156842258ec6cb4cbc8366cf44adbcd5e01bb135884f50d9 +28510c0643d65d478368f9a94674b55038b51706fa278504b202267647e56496
\ No newline at end of file diff --git a/tests/cachekey/project/sources/patch1.expected b/tests/cachekey/project/sources/patch1.expected index e42fa1caa..ddf93d047 100644 --- a/tests/cachekey/project/sources/patch1.expected +++ b/tests/cachekey/project/sources/patch1.expected @@ -1 +1 @@ -13c8dd19ef951a21e245b17d1e54e37368d9e466b613e9b4b4d709e8891a9b8c +4f58a38954577e223787c86509fda69ce7324ef7c1f964113759bb4ddde836b6
\ No newline at end of file diff --git a/tests/cachekey/project/sources/patch2.expected b/tests/cachekey/project/sources/patch2.expected index 4b6552513..8131b2a5c 100644 --- a/tests/cachekey/project/sources/patch2.expected +++ b/tests/cachekey/project/sources/patch2.expected @@ -1 +1 @@ -0159a9df826935ed54e0507040a6f80c153f22bba3efcd2be6ebb30ea6c051b3 +efef9710fd4cf622b448ea9cd6ec02c271a069f02e51dc64512702233ce9d368
\ No newline at end of file diff --git a/tests/cachekey/project/sources/patch3.expected b/tests/cachekey/project/sources/patch3.expected index 642630437..87e9e6727 100644 --- a/tests/cachekey/project/sources/patch3.expected +++ b/tests/cachekey/project/sources/patch3.expected @@ -1 +1 @@ -be0497a68849ab4aeb275dee269df847c73f2bd1e21da99aacaebff94f51dc6f +111c335c4ba0a24ae511a94ff0e8b78155c5c30838222e0d028ce66a46d8e7a8
\ No newline at end of file diff --git a/tests/cachekey/project/sources/tar1.expected b/tests/cachekey/project/sources/tar1.expected index f61846bb3..769de89cf 100644 --- a/tests/cachekey/project/sources/tar1.expected +++ b/tests/cachekey/project/sources/tar1.expected @@ -1 +1 @@ -1467d77c5b100b8e1c17aa32896177b3fc1eb65216475b0e8cf367b816a00a3b +ccbb0b9cdc18824ae3e377bec1eb1801da174c306097ed06a32ba607a5239228
\ No newline at end of file diff --git a/tests/cachekey/project/sources/tar2.expected b/tests/cachekey/project/sources/tar2.expected index bf5a0ac5c..b8ef8c34d 100644 --- a/tests/cachekey/project/sources/tar2.expected +++ b/tests/cachekey/project/sources/tar2.expected @@ -1 +1 @@ -f828f84dad28429badaee1aebd38346975e996b7466967109743bf8dd10b6568 +0b3227cc859c7db8ca82f76784f89bd791890c835ddfbe5709f1a07ccb603550
\ No newline at end of file diff --git a/tests/cachekey/project/sources/zip1.expected b/tests/cachekey/project/sources/zip1.expected index 6672e86ce..f46bea2c8 100644 --- a/tests/cachekey/project/sources/zip1.expected +++ b/tests/cachekey/project/sources/zip1.expected @@ -1 +1 @@ -61b75fc80ab68a1aadc62afbbbc617d94ba561849fe31b4aab943b739191f96c
\ No newline at end of file +8a9973e6cc78963ab0635fffca83102ba7ebbdbdb0a337e3e2ac6c263539e12e
\ No newline at end of file diff --git a/tests/cachekey/project/sources/zip2.expected b/tests/cachekey/project/sources/zip2.expected index 092f688c5..5a97df1a7 100644 --- a/tests/cachekey/project/sources/zip2.expected +++ b/tests/cachekey/project/sources/zip2.expected @@ -1 +1 @@ -692cb18cb28ab55aaaab97a92de07c924791cb8b89e1094771ab035f051ad4c4
\ No newline at end of file +178f8cbbb13bcac601e15c759faf99343e49da92ebdb490b279af5bd429b1b49
\ No newline at end of file diff --git a/tests/cachekey/project/target.expected b/tests/cachekey/project/target.expected index 2260f4bee..41899c29c 100644 --- a/tests/cachekey/project/target.expected +++ b/tests/cachekey/project/target.expected @@ -1 +1 @@ -345ceb4f27d21143002f369d57a34cb2a3a95715f85c4ea4360df7f5cf14a42b
\ No newline at end of file +f79f0553aef15a10d8522918e0a8c05889ea88e6620b6243cb3c0bd15d0ca8ab
\ No newline at end of file diff --git a/tests/completions/completions.py b/tests/completions/completions.py index 428252cb1..d2c631105 100644 --- a/tests/completions/completions.py +++ b/tests/completions/completions.py @@ -19,8 +19,6 @@ MAIN_COMMANDS = [ ] MAIN_OPTIONS = [ - "-a ", - "--arch ", "--builders ", "-c ", "-C ", @@ -30,7 +28,6 @@ MAIN_OPTIONS = [ "--directory ", "--error-lines ", "--fetchers ", - "--host-arch ", "--log-file ", "--message-lines ", "--network-retries ", @@ -44,7 +41,6 @@ MAIN_OPTIONS = [ "--on-error ", "--pushers ", "--strict ", - "--target-arch ", "--verbose ", "--version ", ] diff --git a/tests/context/context.py b/tests/context/context.py index 79691350b..48ce037f7 100644 --- a/tests/context/context.py +++ b/tests/context/context.py @@ -22,7 +22,7 @@ def context_fixture(): return { 'xdg-cache': cache_home, - 'context': Context([], 'x86_64') + 'context': Context([]) } @@ -32,7 +32,6 @@ def context_fixture(): def test_context_create(context_fixture): context = context_fixture['context'] assert(isinstance(context, Context)) - assert(context.host_arch == 'x86_64') ####################################### diff --git a/tests/loader/arches.py b/tests/loader/arches.py deleted file mode 100644 index 1f9d46367..000000000 --- a/tests/loader/arches.py +++ /dev/null @@ -1,112 +0,0 @@ -import os -import pytest - -from buildstream import LoadError, LoadErrorReason -from buildstream._loader import Loader -from buildstream._metaelement import MetaElement -from . import make_options - -DATA_DIR = os.path.join( - os.path.dirname(os.path.realpath(__file__)), - 'arches', -) - - -############################################################## -# Test Simple Arch Conditionals # -############################################################## -@pytest.mark.datafiles(DATA_DIR) -def test_simple_conditional_nomatch(datafiles): - - basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader( - basedir, ['elements/simple-conditional.bst'], make_options(basedir), 'arm', None) - - element = loader.load()[0] - assert(isinstance(element, MetaElement)) - number = element.config.get('number') - - # Did not provide any arch specific data for 'arm', number remains 5 - assert(number == 5) - - -@pytest.mark.datafiles(DATA_DIR) -def test_simple_conditional_x86_64(datafiles): - - basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader( - basedir, ['elements/simple-conditional.bst'], make_options(basedir), 'x86_64', None) - - element = loader.load()[0] - assert(isinstance(element, MetaElement)) - number = element.config.get('number') - - # x86_64 arch overrides the number to 6 - assert(number == 6) - - -@pytest.mark.datafiles(DATA_DIR) -def test_simple_conditional_x86_32(datafiles): - - basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader( - basedir, ['elements/simple-conditional.bst'], make_options(basedir), 'x86_32', None) - - element = loader.load()[0] - assert(isinstance(element, MetaElement)) - number = element.config.get('number') - - # x86_32 arch overrides the number to 7 - assert(number == 7) - - -############################################################## -# Test Arch and Host-Arch Conditionals # -############################################################## - - -@pytest.mark.datafiles(DATA_DIR) -def test_host_arch_conditional_armv8(datafiles): - - basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader( - basedir, ['elements/host-arch-conditional.bst'], make_options(basedir), 'armv8', None) - - element = loader.load()[0] - assert(isinstance(element, MetaElement)) - number = element.config.get('number') - - # armv8 host-arch overrides the number to 88 - assert(number == 88) - - -@pytest.mark.datafiles(DATA_DIR) -def test_host_arch_conditional_ignores_target_arch(datafiles): - - basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader( - basedir, ['elements/host-arch-conditional.bst'], make_options(basedir), 'armv8', 'x86_32') - - element = loader.load()[0] - assert(isinstance(element, MetaElement)) - number = element.config.get('number') - - # The setting a target-arch has no effect on host-arches: the number is - # still 88 - assert(number == 88) - - -@pytest.mark.datafiles(DATA_DIR) -def test_host_arch_conditional_overridden(datafiles): - - basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader( - basedir, ['elements/host-arch-conditional.bst'], make_options(basedir), 'armv8', 'x86_64') - - element = loader.load()[0] - assert(isinstance(element, MetaElement)) - number = element.config.get('number') - - # The 'arches' conditional follows the target architecture, and overrides - # anything specified in 'host-arches'. - assert(number == 6) diff --git a/tests/loader/arches/elements/host-arch-conditional.bst b/tests/loader/arches/elements/host-arch-conditional.bst deleted file mode 100644 index 4c9272feb..000000000 --- a/tests/loader/arches/elements/host-arch-conditional.bst +++ /dev/null @@ -1,20 +0,0 @@ -kind: pony -description: | - An element with host-arches and arches conditionals. - - The 'arches' conditional follows --target-arch if specified, while the - 'host-arches' conditional does not. The 'arches' conditional overrides - 'host-arches' if both for some reason try to override the same thing. -config: - number: 5 -arches: - x86_64: - config: - number: 6 -host-arches: - x86_64: - config: - number: 66 - armv8: - config: - number: 88 diff --git a/tests/loader/arches/elements/simple-conditional.bst b/tests/loader/arches/elements/simple-conditional.bst deleted file mode 100644 index 7d1c1e5d9..000000000 --- a/tests/loader/arches/elements/simple-conditional.bst +++ /dev/null @@ -1,11 +0,0 @@ -kind: pony -description: An element with an arch conditional -config: - number: 5 -arches: - x86_64: - config: - number: 6 - x86_32: - config: - number: 7 diff --git a/tests/loader/basics.py b/tests/loader/basics.py index 1a891b775..3135b4b6e 100644 --- a/tests/loader/basics.py +++ b/tests/loader/basics.py @@ -19,7 +19,7 @@ DATA_DIR = os.path.join( def test_one_file(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/onefile.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/onefile.bst'], make_options(basedir)) element = loader.load()[0] @@ -31,7 +31,7 @@ def test_one_file(datafiles): def test_missing_file(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/missing.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/missing.bst'], make_options(basedir)) with pytest.raises(LoadError) as exc: element = loader.load()[0] @@ -43,7 +43,7 @@ def test_missing_file(datafiles): def test_invalid_reference(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/badreference.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/badreference.bst'], make_options(basedir)) with pytest.raises(LoadError) as exc: element = loader.load()[0] @@ -55,7 +55,7 @@ def test_invalid_reference(datafiles): def test_invalid_yaml(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/badfile.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/badfile.bst'], make_options(basedir)) with pytest.raises(LoadError) as exc: element = loader.load()[0] @@ -70,7 +70,7 @@ def test_fail_fullpath_target(datafiles): fullpath = os.path.join(basedir, 'elements', 'onefile.bst') with pytest.raises(LoadError) as exc: - loader = Loader(basedir, [fullpath], make_options(basedir), None, None) + loader = Loader(basedir, [fullpath], make_options(basedir)) assert (exc.value.reason == LoadErrorReason.INVALID_DATA) @@ -79,7 +79,7 @@ def test_fail_fullpath_target(datafiles): def test_invalid_key(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/invalidkey.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/invalidkey.bst'], make_options(basedir)) with pytest.raises(LoadError) as exc: element = loader.load()[0] diff --git a/tests/loader/dependencies.py b/tests/loader/dependencies.py index 342af96ef..ac6ee5d4b 100644 --- a/tests/loader/dependencies.py +++ b/tests/loader/dependencies.py @@ -19,7 +19,7 @@ DATA_DIR = os.path.join( def test_two_files(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/target.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/target.bst'], make_options(basedir)) element = loader.load()[0] assert(isinstance(element, MetaElement)) @@ -35,7 +35,7 @@ def test_two_files(datafiles): def test_shared_dependency(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/shareddeptarget.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/shareddeptarget.bst'], make_options(basedir)) element = loader.load()[0] # Toplevel is 'pony' with 2 dependencies @@ -78,7 +78,7 @@ def test_shared_dependency(datafiles): def test_dependency_dict(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/target-depdict.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/target-depdict.bst'], make_options(basedir)) element = loader.load()[0] assert(isinstance(element, MetaElement)) @@ -93,7 +93,7 @@ def test_dependency_dict(datafiles): @pytest.mark.datafiles(DATA_DIR) def test_invalid_dependency_declaration(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/invaliddep.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/invaliddep.bst'], make_options(basedir)) with pytest.raises(LoadError) as exc: element = loader.load()[0] @@ -104,7 +104,7 @@ def test_invalid_dependency_declaration(datafiles): @pytest.mark.datafiles(DATA_DIR) def test_circular_dependency(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/circulartarget.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/circulartarget.bst'], make_options(basedir)) with pytest.raises(LoadError) as exc: element = loader.load()[0] @@ -115,7 +115,7 @@ def test_circular_dependency(datafiles): @pytest.mark.datafiles(DATA_DIR) def test_invalid_dependency_type(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/invaliddeptype.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/invaliddeptype.bst'], make_options(basedir)) with pytest.raises(LoadError) as exc: element = loader.load()[0] @@ -126,7 +126,7 @@ def test_invalid_dependency_type(datafiles): @pytest.mark.datafiles(DATA_DIR) def test_build_dependency(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/builddep.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/builddep.bst'], make_options(basedir)) element = loader.load()[0] assert(isinstance(element, MetaElement)) @@ -142,7 +142,7 @@ def test_build_dependency(datafiles): @pytest.mark.datafiles(DATA_DIR) def test_runtime_dependency(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/runtimedep.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/runtimedep.bst'], make_options(basedir)) element = loader.load()[0] assert(isinstance(element, MetaElement)) @@ -158,7 +158,7 @@ def test_runtime_dependency(datafiles): @pytest.mark.datafiles(DATA_DIR) def test_build_runtime_dependency(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/target.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/target.bst'], make_options(basedir)) element = loader.load()[0] assert(isinstance(element, MetaElement)) @@ -175,7 +175,7 @@ def test_build_runtime_dependency(datafiles): @pytest.mark.datafiles(DATA_DIR) def test_all_dependency(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, ['elements/alldep.bst'], make_options(basedir), None, None) + loader = Loader(basedir, ['elements/alldep.bst'], make_options(basedir)) element = loader.load()[0] assert(isinstance(element, MetaElement)) diff --git a/tests/pipeline/load.py b/tests/pipeline/load.py index 90b19ee7e..1d5319c45 100644 --- a/tests/pipeline/load.py +++ b/tests/pipeline/load.py @@ -14,7 +14,7 @@ DATA_DIR = os.path.join( def create_pipeline(tmpdir, basedir, target): - context = Context([], 'x86_64') + context = Context([]) project = Project(basedir, context) context.deploydir = os.path.join(str(tmpdir), 'deploy') diff --git a/tests/plugins/pipeline.py b/tests/plugins/pipeline.py index 9f5e94ae9..1d4133f9e 100644 --- a/tests/plugins/pipeline.py +++ b/tests/plugins/pipeline.py @@ -14,7 +14,7 @@ DATA_DIR = os.path.join( def create_pipeline(tmpdir, basedir, target): - context = Context([], 'x86_64') + context = Context([]) project = Project(basedir, context) context.deploydir = os.path.join(str(tmpdir), 'deploy') diff --git a/tests/project/plugins.py b/tests/project/plugins.py index fd90de9aa..785b42418 100644 --- a/tests/project/plugins.py +++ b/tests/project/plugins.py @@ -14,7 +14,7 @@ DATA_DIR = os.path.join( def create_pipeline(tmpdir, basedir, target): - context = Context([], 'x86_64') + context = Context([]) project = Project(basedir, context) context.artifactdir = os.path.join(str(tmpdir), 'artifact') context._platform = Platform.get_platform() diff --git a/tests/project/project.py b/tests/project/project.py index eff8dd442..15baa7d3c 100644 --- a/tests/project/project.py +++ b/tests/project/project.py @@ -15,7 +15,7 @@ def test_missing_project_conf(datafiles): directory = os.path.join(datafiles.dirname, datafiles.basename) with pytest.raises(LoadError) as exc: - project = Project(directory, Context([], 'x86_64')) + project = Project(directory, Context([])) assert (exc.value.reason == LoadErrorReason.MISSING_FILE) @@ -25,7 +25,7 @@ def test_missing_project_name(datafiles): directory = os.path.join(datafiles.dirname, datafiles.basename, "missingname") with pytest.raises(LoadError) as exc: - project = Project(directory, Context([], 'x86_64')) + project = Project(directory, Context([])) assert (exc.value.reason == LoadErrorReason.INVALID_DATA) @@ -34,7 +34,7 @@ def test_missing_project_name(datafiles): def test_load_basic_project(datafiles): directory = os.path.join(datafiles.dirname, datafiles.basename, "basic") - project = Project(directory, Context([], 'x86_64')) + project = Project(directory, Context([])) # User provided assert (project.name == "pony") @@ -49,7 +49,7 @@ def test_load_basic_project(datafiles): def test_override_project_path(datafiles): directory = os.path.join(datafiles.dirname, datafiles.basename, "overridepath") - project = Project(directory, Context([], 'x86_64')) + project = Project(directory, Context([])) # Test the override assert (project._environment['PATH'] == "/bin:/sbin") @@ -59,7 +59,7 @@ def test_override_project_path(datafiles): def test_project_alias(datafiles): directory = os.path.join(datafiles.dirname, datafiles.basename, "alias") - project = Project(directory, Context([], 'x86_64')) + project = Project(directory, Context([])) # Test the override assert (project.translate_url('baserock:foo') == 'git://git.baserock.org/baserock/foo') @@ -71,6 +71,6 @@ def test_project_unsupported(datafiles): directory = os.path.join(datafiles.dirname, datafiles.basename, "unsupported") with pytest.raises(LoadError) as exc: - project = Project(directory, Context([], 'x86_64')) + project = Project(directory, Context([])) assert (exc.value.reason == LoadErrorReason.UNSUPPORTED_PROJECT) diff --git a/tests/sources/fixture.py b/tests/sources/fixture.py index 3438fe3a6..4630f8d0a 100644 --- a/tests/sources/fixture.py +++ b/tests/sources/fixture.py @@ -21,7 +21,7 @@ class Setup(): def __init__(self, datafiles, target, tmpdir): directory = os.path.join(datafiles.dirname, datafiles.basename) - self.context = Context([], 'x86_64') + self.context = Context([]) self.project = Project(directory, self.context) # A message handler is required @@ -35,7 +35,7 @@ class Setup(): if not os.path.exists(self.context.builddir): os.mkdir(self.context.builddir) - loader = Loader(directory, [target], self.project._options, None, None) + loader = Loader(directory, [target], self.project._options) element = loader.load()[0] # Allow repo aliases to access files in the directories using tmpdir and datafiles diff --git a/tests/variables/variables.py b/tests/variables/variables.py index d6855591e..8f9fd2750 100644 --- a/tests/variables/variables.py +++ b/tests/variables/variables.py @@ -13,7 +13,7 @@ DATA_DIR = os.path.join( def create_pipeline(tmpdir, basedir, target): - context = Context([], 'x86_64') + context = Context([]) project = Project(basedir, context) context.artifactdir = os.path.join(str(tmpdir), 'artifact') context._platform = Platform.get_platform() |