about summary refs log tree commit diff
path: root/third_party/nix/src/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-08-02T17·28-0400
committerglittershark <grfn@gws.fyi>2020-08-02T20·00+0000
commitcc82d6e3605d428a93cdd7063edc30034816df6f (patch)
tree050c6f8fe315a132e836822f9b3b293b8e613813 /third_party/nix/src/tests/CMakeLists.txt
parent7aebba7531c0e29baba1c8c3725ac3597ad859ee (diff)
test(3p/nix): Add test for derivation parse/serialize r/1548
Add a rapidcheck test covering roundtrip parse and serialize for Nix
derivations. This covers a bug we discovered in ef54f5d which broke this
roundtrip.

Change-Id: I72d140334b5f24f79e82e34f98609c695dbfbf93
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1582
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Diffstat (limited to 'third_party/nix/src/tests/CMakeLists.txt')
-rw-r--r--third_party/nix/src/tests/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/third_party/nix/src/tests/CMakeLists.txt b/third_party/nix/src/tests/CMakeLists.txt
index 724a7a95b519..33f4f774a61b 100644
--- a/third_party/nix/src/tests/CMakeLists.txt
+++ b/third_party/nix/src/tests/CMakeLists.txt
@@ -11,6 +11,17 @@ target_link_libraries(attr-set
 
 gtest_discover_tests(attr-set)
 
+add_executable(derivations_test derivations_test.cc)
+target_link_libraries(derivations_test
+  nixexpr
+  nixstore
+  rapidcheck
+  rapidcheck_gtest
+  GTest::gtest_main
+)
+
+gtest_discover_tests(derivations_test)
+
 add_executable(hash_test hash_test.cc)
 target_link_libraries(hash_test
   nixutil