Fix integration tests to work with a custom build/gen.py --out-path Change-Id: Ibc6d73113760781c91671a4aa94e989e6a6a6964 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/23940 Commit-Queue: Matt Stark <msta@google.com> Reviewed-by: Takuto Ikuta <tikuta@google.com>
diff --git a/build/ninja_file.py b/build/ninja_file.py index ff854b7..0202e50 100644 --- a/build/ninja_file.py +++ b/build/ninja_file.py
@@ -104,8 +104,8 @@ command=self.chain( # For golden tests it's very important that if a ninja file is no # longer generated, it is actually deleted. - python('tools/clean.py', '$out.actual'), - f'{build_prefix}{self._gn_exe} gen $out.actual --quiet' + python('tools/clean.py', '$path/out'), + f'{build_prefix}{self._gn_exe} gen $path/out --quiet' ' --root=$path', python('tools/touch.py', '$out'), ), @@ -160,7 +160,7 @@ return self._compare_goldens( name + '_integration_test', inputs=[stamp] + self.directory(golden_path, []), - path=f'{name}.actual', + path=path / 'out', goldens=golden_path, )
diff --git a/integration_tests/simple/goldens/obj/hello.ninja b/integration_tests/simple/goldens/obj/hello.ninja index 1b37420..b5f77f8 100644 --- a/integration_tests/simple/goldens/obj/hello.ninja +++ b/integration_tests/simple/goldens/obj/hello.ninja
@@ -4,7 +4,7 @@ target_out_dir = obj target_output_name = hello -build obj/hello.hello.o: cxx ../../integration_tests/simple/hello.cc +build obj/hello.hello.o: cxx ../hello.cc source_file_part = hello.cc source_name_part = hello
diff --git a/integration_tests/simple/goldens/obj/hello_shared.ninja b/integration_tests/simple/goldens/obj/hello_shared.ninja index 60e4105..998ee5e 100644 --- a/integration_tests/simple/goldens/obj/hello_shared.ninja +++ b/integration_tests/simple/goldens/obj/hello_shared.ninja
@@ -4,7 +4,7 @@ target_out_dir = obj target_output_name = libhello_shared -build obj/libhello_shared.hello_shared.o: cxx ../../integration_tests/simple/hello_shared.cc +build obj/libhello_shared.hello_shared.o: cxx ../hello_shared.cc source_file_part = hello_shared.cc source_name_part = hello_shared
diff --git a/integration_tests/simple/goldens/obj/hello_static.ninja b/integration_tests/simple/goldens/obj/hello_static.ninja index 165a67f..c554743 100644 --- a/integration_tests/simple/goldens/obj/hello_static.ninja +++ b/integration_tests/simple/goldens/obj/hello_static.ninja
@@ -4,7 +4,7 @@ target_out_dir = obj target_output_name = libhello_static -build obj/libhello_static.hello_static.o: cxx ../../integration_tests/simple/hello_static.cc +build obj/libhello_static.hello_static.o: cxx ../hello_static.cc source_file_part = hello_static.cc source_name_part = hello_static