Browse Source

toolset: Fix the --force-rm option (#10286)

* toolset: Fix the --force-rm option

Also, clean up the wrk Dockerfile.

Signed-off-by: Anton Kirilov <[email protected]>

* Address code review comments

---------

Signed-off-by: Anton Kirilov <[email protected]>
Anton Kirilov 2 weeks ago
parent
commit
5e14b91645
3 changed files with 4 additions and 14 deletions
  1. 1 1
      .github/workflows/build.yml
  2. 1 1
      toolset/run-tests.py
  3. 2 12
      toolset/wrk/wrk.dockerfile

+ 1 - 1
.github/workflows/build.yml

@@ -155,7 +155,7 @@ jobs:
           # run-ci.py runs the diffing to see if github actions needs to test this framework. Ideally/eventually,
           # we'd like to try and do the diffing before github_actions_clean & setup.
           # This will run the tests exactly as you would in your own vm:
-          docker network create tfb > /dev/null 2>&1 && docker run --network=tfb -e USER_ID=$(id -u) -e CI=true -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=`pwd`,target=/FrameworkBenchmarks techempower/tfb --mode verify --test-dir $RUN_TESTS --results-environment Github-Actions;
+          docker network create tfb > /dev/null 2>&1 && docker run --network=tfb -e USER_ID=$(id -u) -e CI=true -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=`pwd`,target=/FrameworkBenchmarks techempower/tfb --mode verify --force-rm --test-dir $RUN_TESTS --results-environment Github-Actions;
   dependabot:
     needs: verify
     runs-on: ubuntu-latest

+ 1 - 1
toolset/run-tests.py

@@ -210,7 +210,7 @@ def main(argv=None):
         help='Extra docker arguments to be passed to the test container')
     parser.add_argument(
         '--force-rm',
-        default=False,
+        action='store_true',
         help='Remove intermediate docker containers after running.')
 
     # Network options

+ 2 - 12
toolset/wrk/wrk.dockerfile

@@ -1,17 +1,7 @@
 FROM ubuntu:24.04
 
-# Required scripts for benchmarking
-COPY concurrency.sh pipeline.lua pipeline.sh query.sh ./
-
 ARG DEBIAN_FRONTEND=noninteractive
 RUN apt-get install --no-install-recommends -qqUy curl wrk > /dev/null
 
-# Environment vars required by the wrk scripts with nonsense defaults
-ENV accept=accept \
-    duration=duration \
-    levels=levels \
-    max_concurrency=max_concurrency \
-    max_threads=max_threads \
-    name=name \
-    pipeline=pipeline \
-    server_host=server_host
+# Required scripts for benchmarking
+COPY concurrency.sh pipeline.lua pipeline.sh query.sh ./