From d330f8d250001e34da8e53b09d0e6a2cdb73d31c Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Sun, 22 Jul 2018 10:42:46 +0100 Subject: [PATCH] Use absolute paths for . common Otherwise it can pick up other common in PATH first... --- bench-all | 2 +- bench-boot | 2 +- build | 2 +- gem5-bench-cache | 2 +- gem5-shell | 2 +- gem5-stat | 2 +- qemu-trace2txt | 2 +- run | 4 ++-- rungdb | 2 +- rungdb-user | 2 +- rungdbserver | 2 +- runtc | 2 +- trace-boot | 2 +- trace2line | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/bench-all b/bench-all index 674d963..53fc109 100755 --- a/bench-all +++ b/bench-all @@ -2,7 +2,7 @@ # Run all benchmarks for this repo, and save the results to the # benchmark repo, which should be cloned at ../linux-kernel-module-cheat-benchmarks. set -eux -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" bench_build=false bench_buildroot_baseline=false diff --git a/bench-boot b/bench-boot index 43b245f..d30e0af 100755 --- a/bench-boot +++ b/bench-boot @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" caches='--caches --l2cache --l1d_size=1024kB --l1i_size=1024kB --l2_size=1024kB --l3_size=1024kB' bench() ( common_bench_cmd "./run -a ${1}" "$common_bench_boot" diff --git a/build b/build index fb9b0d8..dfaea6f 100755 --- a/build +++ b/build @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" set -- ${cli_build:-} "$@" mkdir -p "${out_dir}" br2_cli_file="${out_dir}/br2_cli" diff --git a/gem5-bench-cache b/gem5-bench-cache index 1025a7d..b34be17 100755 --- a/gem5-bench-cache +++ b/gem5-bench-cache @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" generate_checkpoints=true while getopts a:C OPT; do case "$OPT" in diff --git a/gem5-shell b/gem5-shell index f1e4086..67a5e9f 100755 --- a/gem5-shell +++ b/gem5-shell @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" while getopts M:n: OPT; do case "$OPT" in M) diff --git a/gem5-stat b/gem5-stat index 8b17688..a621a3a 100755 --- a/gem5-stat +++ b/gem5-stat @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" while getopts a:hs: OPT; do case "$OPT" in a) diff --git a/qemu-trace2txt b/qemu-trace2txt index b847b39..9f4c715 100755 --- a/qemu-trace2txt +++ b/qemu-trace2txt @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" set -- ${cli_qemu_trace2txt:-} "$@" while getopts a: OPT; do case "$OPT" in diff --git a/run b/run index 2da9e1c..88a782e 100755 --- a/run +++ b/run @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" set -- ${cli_run:-} "$@" # CLI handling. @@ -364,7 +364,7 @@ if "$tmux"; then fi fi cmd="time ${cmd}" -if ! "$debug_vm"; then +if [ -z "$debug_vm" ]; then cmd="${cmd} \ |& tee >(ts -s %.s > ${common_termout_file}) \ " diff --git a/rungdb b/rungdb index a2d91da..2bfc960 100755 --- a/rungdb +++ b/rungdb @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" set -- ${cli_rungdb:-} "$@" after= before= diff --git a/rungdb-user b/rungdb-user index 4e5209c..b40c153 100755 --- a/rungdb-user +++ b/rungdb-user @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" set -- ${cli_rungdb_user:-} "$@" usage="$0 []" gem5_opt= diff --git a/rungdbserver b/rungdbserver index 58dafe1..16edda4 100755 --- a/rungdbserver +++ b/rungdbserver @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" set -- ${cli_rungdbserver:-} "$@" while getopts a:g OPT; do case "$OPT" in diff --git a/runtc b/runtc index 22fb324..a846304 100755 --- a/runtc +++ b/runtc @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" set -- ${cli_runtc:-} "$@" while getopts a:gh OPT; do case "$OPT" in diff --git a/trace-boot b/trace-boot index d3b84b8..928982c 100755 --- a/trace-boot +++ b/trace-boot @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" set -- ${cli_trace_boot:-} "$@" while getopts a:g OPT; do case "$OPT" in diff --git a/trace2line b/trace2line index f635e73..40af059 100755 --- a/trace2line +++ b/trace2line @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -. common +. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common" set -- ${cli_trace2line:-} "$@" while getopts a:g OPT; do case "$OPT" in