on master help sign in
Remove symlink from Nix and use sed instead

CI didn't have the right permissions to modify the `/usr` directory.

commit9926b81aed540d879fe9751c2f619c9cc4e61ddb authorguillaume <guillaume@repl.it> dateMon 28 Jun 2021, 11:13 (5 years ago) parentd3b62e2
2 files changed+3−2
build-prybar.nix+1−2 run_tests_language+2
build-prybar.nix+1−2
@@ -45,7 +45,6 @@ in buildGoModule {
4545 # The test file expect the binary to be in the current directory rather than bin
4646 preCheck = ''
4747 cp $GOPATH/bin/${language} ./prybar-${language}
48− ln -s ${expect} /usr
4948 '';
5049
5150 # Add all the dependencies to the check. Binaries should include the language interpreter/binaries
@@ -56,7 +55,7 @@ in buildGoModule {
5655 checkPhase = ''
5756 runHook preCheck
5857
59− ${bash}/bin/bash ./run_tests_language ${language}
58+ ${bash}/bin/bash ./run_tests_language ${language} ${expect}/bin
6059
6160 runHook postCheck
6261 '';
run_tests_language+2
@@ -4,6 +4,7 @@ stty cols 80
44stty rows 20
55
66language=$1
7+expect_path="$(echo $2 | sed 's;/;\\/;g')"
78tests=$(find "./tests/${language}" -printf '%P\n')
89
910for t in ${tests}; do
@@ -16,6 +17,7 @@ for t in ${tests}; do
1617
1718 echo -n "... ${language} $name"
1819
20+ sed -i "s/#!\/usr\/bin\/expect/#!${expect_path}\/expect/" "./tests/${language}/$t"
1921 test_out=$(timeout 15 "./tests/${language}/$t" 2>&1)
2022 if [[ $? != 0 ]]; then
2123 echo -e "\n========== \"$t\" failed =========="