Debian Codegraph @

coin/instructions/cmake_setup_running_qnxqemu_tests_env_vars.yaml

raw symbols SCIP
1 type: Group
2 instructions:
3 - type: WriteFile
4 filename: "{{.SourceDir}}/coin_qnx_qemu_runner.sh"
5 fileMode: 493
6 fileContents: |
7 #!/bin/sh
8
9 # Many tests require changing into their directory, in order to find
10 # files they depend on.
11 testdir=`dirname "$1"`
12
13 # The remote SSH server executes everything we send under "sh -c". So
14 # the only way to preserve arguments is to shell-quote them and send
15 # them as a single string. We use python's shlex module for that.
16
17 quoted_args=`python3 -c 'import sys, shlex; print(shlex.join(sys.argv[1:]))' "$@"`
18
19 ssh "$QNX_QEMU_SSH" \
20 cd "$testdir" \; $QNX_TEST_ENV "$quoted_args"