Loading tests/frontend/buildcheckout.py +41 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,47 @@ def test_build_checkout(datafiles, cli, strict, hardlinks): assert os.path.exists(filename) @pytest.mark.datafiles(os.path.join(os.path.dirname( os.path.realpath(__file__)), "project_world", )) @pytest.mark.parametrize("strict,hardlinks", [ ("strict", "copies"), ("strict", "hardlinks"), ("non-strict", "copies"), ("non-strict", "hardlinks"), ]) def test_build_world_checkout(datafiles, cli, strict, hardlinks): project = os.path.join(datafiles.dirname, datafiles.basename) checkout = os.path.join(cli.directory, 'checkout') # First build it result = cli.run(project=project, args=strict_args(['build', '--world'], strict)) result.assert_success() # Assert that after a successful build, the builddir is empty builddir = os.path.join(cli.directory, 'build') assert os.path.isdir(builddir) assert not os.listdir(builddir) # Prepare checkout args checkout_args = strict_args(['checkout'], strict) if hardlinks == "hardlinks": checkout_args += ['--hardlinks'] checkout_args += ['target.bst', checkout] # Now check it out result = cli.run(project=project, args=checkout_args) result.assert_success() # Check that the executable hello file is found in the checkout filename = os.path.join(checkout, 'usr', 'bin', 'hello') assert os.path.exists(filename) filename = os.path.join(checkout, 'usr', 'include', 'pony.h') assert os.path.exists(filename) @pytest.mark.datafiles(DATA_DIR) @pytest.mark.parametrize("deps", [("run"), ("none")]) def test_build_checkout_deps(datafiles, cli, deps): Loading tests/frontend/project_world/elements/compose-all.bst 0 → 100644 +12 −0 Original line number Diff line number Diff line kind: compose depends: - filename: import-bin.bst type: build - filename: import-dev.bst type: build config: # Dont try running the sandbox, we dont have a # runtime to run anything in this context. integrate: False tests/frontend/project_world/elements/compose-exclude-dev.bst 0 → 100644 +16 −0 Original line number Diff line number Diff line kind: compose depends: - filename: import-bin.bst type: build - filename: import-dev.bst type: build config: # Dont try running the sandbox, we dont have a # runtime to run anything in this context. integrate: False # Exclude the dev domain exclude: - devel tests/frontend/project_world/elements/compose-include-bin.bst 0 → 100644 +16 −0 Original line number Diff line number Diff line kind: compose depends: - filename: import-bin.bst type: build - filename: import-dev.bst type: build config: # Dont try running the sandbox, we dont have a # runtime to run anything in this context. integrate: False # Only include the runtim include: - runtime tests/frontend/project_world/elements/import-bin.bst 0 → 100644 +4 −0 Original line number Diff line number Diff line kind: import sources: - kind: local path: files/bin-files Loading
tests/frontend/buildcheckout.py +41 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,47 @@ def test_build_checkout(datafiles, cli, strict, hardlinks): assert os.path.exists(filename) @pytest.mark.datafiles(os.path.join(os.path.dirname( os.path.realpath(__file__)), "project_world", )) @pytest.mark.parametrize("strict,hardlinks", [ ("strict", "copies"), ("strict", "hardlinks"), ("non-strict", "copies"), ("non-strict", "hardlinks"), ]) def test_build_world_checkout(datafiles, cli, strict, hardlinks): project = os.path.join(datafiles.dirname, datafiles.basename) checkout = os.path.join(cli.directory, 'checkout') # First build it result = cli.run(project=project, args=strict_args(['build', '--world'], strict)) result.assert_success() # Assert that after a successful build, the builddir is empty builddir = os.path.join(cli.directory, 'build') assert os.path.isdir(builddir) assert not os.listdir(builddir) # Prepare checkout args checkout_args = strict_args(['checkout'], strict) if hardlinks == "hardlinks": checkout_args += ['--hardlinks'] checkout_args += ['target.bst', checkout] # Now check it out result = cli.run(project=project, args=checkout_args) result.assert_success() # Check that the executable hello file is found in the checkout filename = os.path.join(checkout, 'usr', 'bin', 'hello') assert os.path.exists(filename) filename = os.path.join(checkout, 'usr', 'include', 'pony.h') assert os.path.exists(filename) @pytest.mark.datafiles(DATA_DIR) @pytest.mark.parametrize("deps", [("run"), ("none")]) def test_build_checkout_deps(datafiles, cli, deps): Loading
tests/frontend/project_world/elements/compose-all.bst 0 → 100644 +12 −0 Original line number Diff line number Diff line kind: compose depends: - filename: import-bin.bst type: build - filename: import-dev.bst type: build config: # Dont try running the sandbox, we dont have a # runtime to run anything in this context. integrate: False
tests/frontend/project_world/elements/compose-exclude-dev.bst 0 → 100644 +16 −0 Original line number Diff line number Diff line kind: compose depends: - filename: import-bin.bst type: build - filename: import-dev.bst type: build config: # Dont try running the sandbox, we dont have a # runtime to run anything in this context. integrate: False # Exclude the dev domain exclude: - devel
tests/frontend/project_world/elements/compose-include-bin.bst 0 → 100644 +16 −0 Original line number Diff line number Diff line kind: compose depends: - filename: import-bin.bst type: build - filename: import-dev.bst type: build config: # Dont try running the sandbox, we dont have a # runtime to run anything in this context. integrate: False # Only include the runtim include: - runtime
tests/frontend/project_world/elements/import-bin.bst 0 → 100644 +4 −0 Original line number Diff line number Diff line kind: import sources: - kind: local path: files/bin-files