This is a note for logging my simple way to use ssh and bash with continuous integration on remote server.
You can execute the following test-cases.sh on your host.
It will execute remote script of the test with correct argument contents.
source code of test-cases.sh on host
directory layout of tester account on test-server
source code of tests.sh on test-server
result of test-cases.sh example
source ./test-cases.sh
➜ ~ run_cases "\"1\"\"" "b'\"" "c'#\"" "\"\"" "\'"
ssh test-server cd test-cases; /bin/bash ./tests.sh "\"1\"\"" "b\'\"" "c\'\#\"" "\"\"" "\\'"
argv[1]=["1""]
argv[2]=[b\'"]
argv[3]=[c\'\#"]
argv[4]=[""]
argv[5]=[\\']
沒有留言:
張貼留言