SIPp / sipp

The SIPp testing tool
https://sipp.readthedocs.io
Other
888 stars 375 forks source link

regress/runtests fails for an out-of-source build #713

Open ryandesign opened 3 months ago

ryandesign commented 3 months ago

I can run the tests if I do an in-source build:

cd /Volumes/Shared/sipp
LDFLAGS=-L/opt/local/lib cmake .
make -j8
regress/runtests

But if I try an out-of-source build it fails:

cd /Volumes/Shared/sipp
mkdir build
cd build
LDFLAGS=-L/opt/local/lib cmake ..
make -j8
../regress/runtests

Each test prints an error like this:

github-#0018/../functions: line 32: /Volumes/Shared/sipp: is a directory
github-#0018/../functions: line 32: exec: /Volumes/Shared/sipp: cannot execute: Undefined error: 0

The function in question is:

https://github.com/SIPp/sipp/blob/d1bdebe2e90d36f4d4bd4061b398d85b4880ac5d/regress/functions#L12-L28

As I understand this function, it successively checks higher and higher parent directories of the test directory for something called sipp that is executable. In my case, it stops when it finds the directory sipp into which I cloned the sipp repository, since the executable sipp is not in a parent directory of the test in an out-of-source build. If I rename the source directory so that it is not called sipp, then it fails with:

github-#0018/../functions: line 32: exec: : not found

It works if I specify the path to sipp:

SIPP=$PWD/sipp ../regress/runtests

So maybe the bug is just that the necessity of specifying SIPP for out-of-source builds is not documented, and the script doesn't exit earlier with a friendlier error message?

wdoekes commented 2 months ago

So maybe the bug is just that the necessity of specifying SIPP for out-of-source builds is not documented, and the script doesn't exit earlier with a friendlier error message?

Yeah. You're running into an unexpected edge case there.

PRs -- documentation and otherwise -- are welcome :)