test: fix broken deploy-test path in test-setup.sh#146
Open
mazurroman wants to merge 1 commit into
Open
Conversation
'$SCRIPT_DIR' is already the test/ directory (the script lives there), but the --deploy-test branch joined it with 'test/' again, so $SCRIPT_DIR/test/deploy-test-contract.sh resolved to '<repo>/test/test/deploy-test-contract.sh' — which doesn't exist. The '-x' guard silently masked the bug: './test/test-setup.sh --deploy-test' (and 'make test-deploy', which calls into it) always fell through to 'Test deployment script not found or not executable' and exited 0 without doing anything. Drop the extra 'test/' segment so the script actually invokes test/deploy-test-contract.sh.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$SCRIPT_DIRintest/test-setup.shalready resolves to thetest/directory (the script lives there), but the--deploy-testbranch joined it withtest/again — so$SCRIPT_DIR/test/deploy-test-contract.shresolved to<repo>/test/test/deploy-test-contract.sh, which doesn't exist.The
-xguard silently masked the bug:./test/test-setup.sh --deploy-test(andmake test-deploy, which delegates to it via the Makefile) always fell through to the "Test deployment script not found or not executable" branch and exited 0 without doing anything.Drop the extra
test/segment so the script actually invokestest/deploy-test-contract.sh.Test plan
ls test/deploy-test-contract.shexists;ls test/test/deploy-test-contract.shdid not.bash -n test/test-setup.sh— syntax OK.test/run-tests.sh(which already uses${SCRIPT_DIR}/deploy-test-contract.sh).