Skip to content

Commit

Permalink
test: update test_build_generator test to ensure override (#161)
Browse files Browse the repository at this point in the history
Signed-off-by: Alfi Maulana <alfi.maulana.f@gmail.com>
  • Loading branch information
threeal authored Oct 9, 2024
1 parent 61c2684 commit b329a1b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/test_build_generator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ section("it should build a package with the default generator")
endsection()

section("it should fail to rebuild the package "
"because of an invalid parent generator")
"because of an invalid main project generator")
block()
set(CMAKE_GENERATOR invalid)
assert_fatal_error(
Expand All @@ -33,7 +33,7 @@ section("it should fail to rebuild the package "
endsection()
endsection()

section("it should rebuild the package with the parent generator")
section("it should rebuild the package with the main project generator")
block()
set(CMAKE_GENERATOR "Unix Makefiles")
cdeps_build_package(pkg)
Expand All @@ -54,6 +54,7 @@ endsection()
section("it should fail to rebuild the package "
"because of an invalid specified generator")
block()
set(CMAKE_GENERATOR "Unix Makefiles")
assert_fatal_error(
CALL cdeps_build_package pkg GENERATOR invalid
MESSAGE "CDeps: Failed to configure pkg:")
Expand All @@ -65,7 +66,10 @@ section("it should fail to rebuild the package "
endsection()

section("it should rebuild the package with the specified generator")
cdeps_build_package(pkg GENERATOR "Unix Makefiles")
block()
set(CMAKE_GENERATOR invalid)
cdeps_build_package(pkg GENERATOR "Unix Makefiles")
endblock()

section("it should regenerate the lock file")
file(READ .cdeps/pkg/build.lock CONTENT)
Expand Down

0 comments on commit b329a1b

Please sign in to comment.