Start a env_parallel session to avoid argument too long errors (#1446)

Co-authored-by: Gulshan Singh <gsgx@google.com>
Fixes https://github.com/pwndbg/pwndbg/issues/1430
pull/1448/head
Gulshan Singh 3 years ago committed by GitHub
parent 7263d14adf
commit d08c6af337
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,6 +3,19 @@
set -o errexit
set -o pipefail
# env_parallel will fail if there are too many environment variables, so we need
# to use `--session` or `--record-env`, and only `--record-env` is supported on
# the version of `parallel` on Ubuntu 20.04 and earlier. The directory also
# needs to be created for CI
mkdir -p ~/.parallel
. $(which env_parallel.bash)
# Workaround for Ubuntu 20.04/18.04 CI. If no aliases are defined
# `env_parallel --record-env` will have non-zero exit code for older versions of
# `parallel`, so we define a dummy alias here
alias __dummy=foo
env_parallel --record-env
ROOT_DIR="$(readlink -f ../../)"
GDB_INIT_PATH="$ROOT_DIR/gdbinit.py"
COVERAGERC_PATH="$ROOT_DIR/pyproject.toml"
@ -167,9 +180,8 @@ else
echo ""
fi
. $(which env_parallel.bash)
env_parallel --output-as-files --joblog $JOBLOG_PATH run_test ::: "${TESTS_LIST[@]}" | env_parallel parse_output_file {}
# The `--env _` is required when using `--record-env`
env_parallel --env _ --output-as-files --joblog $JOBLOG_PATH run_test ::: "${TESTS_LIST[@]}" | env_parallel --env _ parse_output_file {}
fi
end=$(date +%s)

Loading…
Cancel
Save