Skip to content

Commit

Permalink
fix(tools): ci.sh wsl2 lsmem does not support memory blocks #556
Browse files Browse the repository at this point in the history
Added a fallback || true suffix to the lsmem, lscpu and smem commands
which are used by the ci.sh script to dump diagnostic information about
the hardware of the CI runner prior to actually proceeding with the
execution of the full build+test suite.

The existing guards examining the presence of the lsmem binary were
not enough because the lsmem binary is indeed present on WSL 2
Ubuntu, it just does not work as intended (exit code is non-zero which
crashes the ci.sh script by design)

Fixes #556

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Mar 30, 2021
1 parent a5affc5 commit 24f8c25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ function mainTask()
if ! [ -x "$(command -v lscpu)" ]; then
echo 'lscpu is not installed, skipping...'
else
lscpu
lscpu || true
fi

if ! [ -x "$(command -v lsmem)" ]; then
echo 'lsmem is not installed, skipping...'
else
lsmem
lsmem || true
fi

if ! [ -x "$(command -v smem)" ]; then
echo 'smem is not installed, skipping...'
else
smem --abbreviate --totals --system
smem --abbreviate --totals --system || true
fi

# Travis does not have (nor need) nvm but CircleCI does have nvm and also
Expand Down

0 comments on commit 24f8c25

Please sign in to comment.