You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
948B

  1. import pytest
  2. import subprocess
  3. from tests import DDS, DDSFixtureParams, dds_fixture_conf, dds_fixture_conf_1
  4. from tests.http import RepoFixture
  5. dds_conf = dds_fixture_conf(
  6. DDSFixtureParams(ident='git-remote', subdir='git-remote'),
  7. DDSFixtureParams(ident='no-deps', subdir='no-deps'),
  8. )
  9. @dds_conf
  10. def test_deps_build(dds: DDS, http_repo: RepoFixture):
  11. http_repo.import_json_file(dds.source_root / 'catalog.json')
  12. dds.repo_add(http_repo.url)
  13. assert not dds.repo_dir.exists()
  14. dds.build()
  15. assert dds.repo_dir.exists(), '`Building` did not generate a repo directory'
  16. @dds_fixture_conf_1('use-remote')
  17. def test_use_nlohmann_json_remote(dds: DDS, http_repo: RepoFixture):
  18. http_repo.import_json_file(dds.source_root / 'catalog.json')
  19. dds.repo_add(http_repo.url)
  20. dds.build(apps=True)
  21. app_exe = dds.build_dir / f'app{dds.exe_suffix}'
  22. assert app_exe.is_file()
  23. subprocess.check_call([str(app_exe)])