diff --git a/src/base/intmath.test.cc b/src/base/intmath.test.cc index 5740bd4b86..4e88b00886 100644 --- a/src/base/intmath.test.cc +++ b/src/base/intmath.test.cc @@ -72,11 +72,17 @@ TEST(IntmathTest, floorLog2) EXPECT_EQ(0, floorLog2((int64_t)1)); } +/* The IntmathDeathTest floorLog2 test is dependent on an assert being + * triggered. We therefore only run this test for .debug and .opt (where + * `TRACING_ON == 1`). + */ +#if TRACING_ON TEST(IntmathDeathTest, floorLog2) { // Verify a non-positive input triggers an assert. EXPECT_DEATH_IF_SUPPORTED(floorLog2(0), "x > 0"); } +#endif TEST(IntmathTest, ceilLog2) { diff --git a/src/base/sat_counter.test.cc b/src/base/sat_counter.test.cc index 6de7ef787b..214b015774 100644 --- a/src/base/sat_counter.test.cc +++ b/src/base/sat_counter.test.cc @@ -185,9 +185,13 @@ TEST(SatCounterTest, Shift) ASSERT_EQ(counter, 0); // Make sure the counters cannot be shifted by negative numbers, since - // that is undefined behaviour + // that is undefined behaviour. As these tests depend on asserts failing, + // these tests are only functional if `TRACING_ON == 1`, when gem5 is + // compiled as `debug` or `opt`. + #if TRACING_ON ASSERT_DEATH(counter >>= -1, ""); ASSERT_DEATH(counter <<= -1, ""); + #endif } /** diff --git a/util/dockerfiles/gcn-gpu/Dockerfile b/util/dockerfiles/gcn-gpu/Dockerfile index 065dad63da..d0fe759eb8 100644 --- a/util/dockerfiles/gcn-gpu/Dockerfile +++ b/util/dockerfiles/gcn-gpu/Dockerfile @@ -34,8 +34,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libboost-filesystem-dev \ libboost-system-dev \ libboost-dev \ - libpng12-dev \ - libelf-dev + libpng12-dev RUN python -m pip install -U pip && \ python -m pip install -U setuptools scons diff --git a/util/dockerfiles/ubuntu-18.04_clang-version/Dockerfile b/util/dockerfiles/ubuntu-18.04_clang-version/Dockerfile index b98af8818a..428bd02913 100644 --- a/util/dockerfiles/ubuntu-18.04_clang-version/Dockerfile +++ b/util/dockerfiles/ubuntu-18.04_clang-version/Dockerfile @@ -40,7 +40,7 @@ RUN apt -y update RUN apt -y upgrade RUN apt -y install git m4 scons zlib1g zlib1g-dev clang-${version} \ libprotobuf-dev protobuf-compiler libprotoc-dev libgoogle-perftools-dev \ - python-dev python python-six doxygen libelf-dev + python-dev python python-six doxygen RUN apt-get --purge -y remove gcc diff --git a/util/dockerfiles/ubuntu-18.04_gcc-version/Dockerfile b/util/dockerfiles/ubuntu-18.04_gcc-version/Dockerfile index 5eb40b1b3c..902e4a014b 100644 --- a/util/dockerfiles/ubuntu-18.04_gcc-version/Dockerfile +++ b/util/dockerfiles/ubuntu-18.04_gcc-version/Dockerfile @@ -37,8 +37,7 @@ RUN apt -y update RUN apt -y upgrade RUN apt -y install git m4 scons zlib1g zlib1g-dev gcc-multilib \ libprotobuf-dev protobuf-compiler libprotoc-dev libgoogle-perftools-dev \ - python-dev python python-six doxygen wget zip gcc-${version} \ - g++-${version} libelf-dev + python-dev python python-six doxygen wget zip gcc-${version} g++-${version} RUN update-alternatives --install \ /usr/bin/g++ g++ /usr/bin/g++-${version} 100 diff --git a/util/dockerfiles/ubuntu-18.04_min-dependencies/Dockerfile b/util/dockerfiles/ubuntu-18.04_min-dependencies/Dockerfile index f55ea2d08d..986b2b62bf 100644 --- a/util/dockerfiles/ubuntu-18.04_min-dependencies/Dockerfile +++ b/util/dockerfiles/ubuntu-18.04_min-dependencies/Dockerfile @@ -29,4 +29,4 @@ FROM ubuntu:18.04 RUN apt -y update RUN apt -y upgrade RUN apt -y install build-essential scons zlib1g-dev m4 python-dev python \ - python-six libelf-dev + python-six diff --git a/util/dockerfiles/ubuntu-20.04_gcc-version/Dockerfile b/util/dockerfiles/ubuntu-20.04_gcc-version/Dockerfile index d9521831a6..d2008b6031 100644 --- a/util/dockerfiles/ubuntu-20.04_gcc-version/Dockerfile +++ b/util/dockerfiles/ubuntu-20.04_gcc-version/Dockerfile @@ -38,7 +38,7 @@ RUN apt -y upgrade RUN apt -y install git m4 scons zlib1g zlib1g-dev libprotobuf-dev \ protobuf-compiler libprotoc-dev libgoogle-perftools-dev python3-dev \ python3-six python-is-python3 doxygen libboost-all-dev libhdf5-serial-dev \ - python3-pydot libpng-dev gcc-${version} g++-${version} libelf-dev + python3-pydot libpng-dev gcc-${version} g++-${version} RUN update-alternatives --install \ /usr/bin/g++ g++ /usr/bin/g++-${version} 100