diff options
-rw-r--r-- | default.nix | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/default.nix b/default.nix index a372bba..c75c368 100644 --- a/default.nix +++ b/default.nix | |||
@@ -90,18 +90,17 @@ in rec { | |||
90 | "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" | 90 | "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" |
91 | ]; | 91 | ]; |
92 | 92 | ||
93 | postInstall = '' | ||
94 | mkdir -p $out/tests | ||
95 | cp ./tests/clientapitest ./tests/resourceconfigtest ./tests/storagetest ./tests/domainadaptortest ./tests/messagequeuetest ./tests/indextest ./tests/resourcecommunicationtest ./tests/pipelinetest ./tests/querytest ./tests/modelinteractivitytest ./tests/inspectiontest ./tests/accountstest ./tests/testaccounttest ./tests/dummyresourcemailtest ./tests/interresourcemovetest ./tests/notificationtest ./tests/entitystoretest ./tests/upgradetest ./tests/resourcecontroltest ./tests/dummyresourcetest $out/tests | ||
96 | ''; | ||
97 | |||
93 | src = sinkSrc; | 98 | src = sinkSrc; |
94 | inherit cmakeBuildType; | 99 | inherit cmakeBuildType; |
95 | }; | 100 | }; |
96 | 101 | ||
97 | sinkTest = sink.overrideAttrs (oldAttrs: rec { | 102 | sinkTest = pkgs.writeShellScriptBin "sinkTest" '' |
98 | doCheck = true; | 103 | export HOME="$(mktemp -d)" |
99 | # Only tests that does not involve external resources | ||
100 | checkPhase = '' | ||
101 | export HOME="$PWD" | ||
102 | mkdir -p plugins/sink/resources | ||
103 | ln -s examples/*resource/libsink_resource*.so plugins/sink/resources/ | ||
104 | export LD_LIBRARY_PATH=$PWD/tests:$PWD/examples/caldavresource/:$PWD/examples/dummyresource/:$PWD/tests/hawd:$PWD/common QT_PLUGIN_PATH=$QT_PLUGIN_PATH:$PWD/plugins/ PATH=$PATH:$PWD/synchronizer/ | ||
105 | ./tests/clientapitest && | 104 | ./tests/clientapitest && |
106 | ./tests/resourceconfigtest && | 105 | ./tests/resourceconfigtest && |
107 | ./tests/storagetest && | 106 | ./tests/storagetest && |
@@ -122,8 +121,11 @@ in rec { | |||
122 | ./tests/upgradetest && | 121 | ./tests/upgradetest && |
123 | ./tests/resourcecontroltest && | 122 | ./tests/resourcecontroltest && |
124 | ./tests/dummyresourcetest | 123 | ./tests/dummyresourcetest |
124 | ret=$? | ||
125 | rm -rf $HOME | ||
126 | return $ret | ||
125 | ''; | 127 | ''; |
126 | }); | 128 | }; |
127 | 129 | ||
128 | kube = stdenv.mkDerivation { | 130 | kube = stdenv.mkDerivation { |
129 | name = "kube"; | 131 | name = "kube"; |