Skip to content

Commit

Permalink
installing test scripts (make check-installed)
Browse files Browse the repository at this point in the history
	and cleaning the installed check (test) directory affter finished
  • Loading branch information
ahori@riken.jp committed Sep 1, 2020
1 parent 40d6aae commit ef44001
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ install_test_dirtop = $(prefix)/pip-test
install_test_dir = $(prefix)/pip-test/test
test_build_dir = $(install_test_dirtop)/build

.PHONY: check-installed-prepare
check-installed-prepare: install
.PHONY: clean-check-installed
clean-check-installed:
-$(RM) -r $(install_test_dirtop)

.PHONY: check-installed-prepare
check-installed-prepare: clean-check-installed install
$(MKDIR_P) $(install_test_dirtop)
ln -f -s $(prefix)/bin $(install_test_dirtop)
$(MKDIR_P) $(test_build_dir)
Expand All @@ -84,6 +87,7 @@ do-check-installed: check-installed-programs

.PHONY: check-installed
check-installed: do-check-installed
$(MAKE) clean-check-installed

### doc

Expand Down
4 changes: 2 additions & 2 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define PACKAGE_NAME "Process-in-Processs"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "Process-in-Processs 2.0.0"
#define PACKAGE_STRING "Process-in-Processs 3.0.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "proc-in-proc"
Expand All @@ -17,7 +17,7 @@
#define PACKAGE_URL "https://github.com/RIKEN-SysSoft/PiP"

/* Define to the version of this package. */
#define PACKAGE_VERSION "2.0.0"
#define PACKAGE_VERSION "3.0.0"

/* cache line size */
#define CACHE_LINE_SIZE 64
4 changes: 3 additions & 1 deletion test/compat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ test:

install_test_compat = $(install_test_dir)/compat

TESTS = test.list task.list blt.list

check-installed :
$(MKDIR_P) $(install_test_compat)
$(INSTALL) -C -m 644 Makefile $(SRCS) test.list $(install_test_compat)
$(INSTALL) -C -m 644 Makefile $(SRCS) $(TESTS) $(install_test_compat)
4 changes: 3 additions & 1 deletion test/fortran/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ test :

install_test_fortran = $(install_test_dir)/fortran

TESTS = task.list blt.list

check-installed :
$(MKDIR_P) $(install_test_fortran)
$(INSTALL) -C -m 644 Makefile $(SRCS) task.list blt.list $(install_test_fortran)
$(INSTALL) -C -m 644 Makefile $(SRCS) $(TESTS) $(install_test_fortran)
14 changes: 7 additions & 7 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ if [ $OMP_NUM_THREADS -lt 4 ]; then
exit 1;
fi

if test -f "$dir_real/../lib/libpip.so"; then
if test -x "$dir_real/../lib/libpip.so"; then
debug=`$dir_real/../lib/libpip.so --debug`
elif test -f "$dir_real/../../lib/libpip.so"; then
elif test -x "$dir_real/../../lib/libpip.so"; then
debug=`$dir_real/../../lib/libpip.so --debug`
else
echo "Unable to find libpip.so";
echo "Unable to execute libpip.so";
exit 2;
fi

Expand Down Expand Up @@ -279,9 +279,6 @@ fi

if [ -n "$MCEXEC" ]; then
pip_mode_list_all='T';
if [ x"$quiet" = x ]; then
echo MCEXEC=$MCEXEC
fi
else
pip_mode_list_all='L G C T';
fi
Expand All @@ -291,6 +288,9 @@ if [ x"$SUMMARY_FILE" = x ]; then
echo LD_PRELOAD=$LD_PRELOAD
echo 'NTASKS: ' ${NTASKS}
echo 'NTHERADS:' ${OMP_NUM_THREADS}
if [ x"$MCEXEC" != x ]; then
echo 'MCEXEC: ' $MCEXEC
fi
fi

# check whether each $PIP_MODE is testable or not
Expand Down Expand Up @@ -387,7 +387,7 @@ while read line; do

SECONDS=0
PIP_MODE=${pip_mode_name} \
${cmd} > ${TEST_OUT_STDOUT} 2> ${TEST_OUT_STDERR} \
${MCEXEC} ${cmd} > ${TEST_OUT_STDOUT} 2> ${TEST_OUT_STDERR} \
< /dev/null;
test_exit_status=$?
t=$SECONDS
Expand Down

0 comments on commit ef44001

Please sign in to comment.