diff --git a/lkp-tests/Dockerfile b/lkp-tests/Dockerfile index fa7b635..c214e85 100644 --- a/lkp-tests/Dockerfile +++ b/lkp-tests/Dockerfile @@ -16,6 +16,10 @@ WORKDIR /usr/src/lkp-tests RUN make install \ && lkp install -COPY run.sh /usr/local/bin/run-hackbench +# Create the lkp user and group +RUN groupadd --gid 1090 lkp +RUN useradd --uid 1090 --gid 1090 lkp + +COPY run.sh /usr/local/bin/run-bench CMD [ "lkp" ] diff --git a/lkp-tests/run.sh b/lkp-tests/run.sh index d02e9b9..e118936 100755 --- a/lkp-tests/run.sh +++ b/lkp-tests/run.sh @@ -1,10 +1,20 @@ -#!/bin/sh +#!/bin/bash +set -e +set -o pipefail -echo "Installing dependencies for hackbench..." -yes | lkp install ./jobs/hackbench-100.yaml +ARG=$1 +JOB_FILE="./jobs/${ARG}.yaml" -echo "Running hackbench..." -yes | lkp run ./jobs/hackbench-100.yaml +if [[ ! -f "$JOB_FILE" ]]; then + echo "$JOB_FILE does not exist, please select a job that is in the jobs directory." 1>&2; + exit 1 +fi -echo "Getting result from hackbench..." -lkp stat hackbench +echo "Installing dependencies for ${ARG}..." +lkp install "$JOB_FILE" + +echo "Running ${ARG}..." +lkp run "$JOB_FILE" + +echo "Getting result from ${ARG}..." +lkp stat