599d67b6a4
Meson versions 0.52 and 0.53 are being overly smart and detecting the path
"/sys/devices/system/cpu/present" in the call to cat in
app/test/meson.build and then adding it as a dependency to the build
configuration. This causes issues on systems where the timestamp of that
file always returns the current time, since it means that the build.ninja
file is always out of date, and therefore needs to be rebuilt.
We can fix this by just using a simple shell script to return the coremask
appropriately for BSD and Linux, and removing that code logic from meson -
thereby hiding the use of the /sys file.
Fixes: c70622ac6f
("test: detect number of cores with meson")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
14 lines
294 B
Bash
Executable File
14 lines
294 B
Bash
Executable File
#! /bin/sh -e
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright(c) 2019 Intel Corporation
|
|
|
|
if [ "$(uname)" = "Linux" ] ; then
|
|
cat /sys/devices/system/cpu/present
|
|
elif [ "$(uname)" = "FreeBSD" ] ; then
|
|
ncpus=$(/sbin/sysctl -n hw.ncpu)
|
|
echo 0-$(expr $ncpus - 1)
|
|
else
|
|
# fallback
|
|
echo 0-3
|
|
fi
|