![Yannick Brosseau](/assets/img/avatar_default.png)
The execveat test try to exec the Makefile file and expect an EACCES results. When running the test in the installed destination it would fail with ENOENT since the file is not there. Add Makefile to the TEST_FILES list so it's copied at install time. Signed-off-by: Yannick Brosseau <scientist@fb.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
28 lines
557 B
Makefile
28 lines
557 B
Makefile
CFLAGS = -Wall
|
|
BINARIES = execveat
|
|
DEPS = execveat.symlink execveat.denatured script subdir
|
|
all: $(BINARIES) $(DEPS)
|
|
|
|
subdir:
|
|
mkdir -p $@
|
|
script:
|
|
echo '#!/bin/sh' > $@
|
|
echo 'exit $$*' >> $@
|
|
chmod +x $@
|
|
execveat.symlink: execveat
|
|
ln -s -f $< $@
|
|
execveat.denatured: execveat
|
|
cp $< $@
|
|
chmod -x $@
|
|
%: %.c
|
|
$(CC) $(CFLAGS) -o $@ $^
|
|
|
|
TEST_PROGS := execveat
|
|
# Makefile is a run-time dependency, since it's accessed by the execveat test
|
|
TEST_FILES := $(DEPS) Makefile
|
|
|
|
include ../lib.mk
|
|
|
|
clean:
|
|
rm -rf $(BINARIES) $(DEPS) subdir.moved execveat.moved xxxxx*
|