Skip to content

Commit

Permalink
231018.130045.HKT create fortran/tests/tools to contain checktest
Browse files Browse the repository at this point in the history
…, `*lint`, and `*src`
  • Loading branch information
zaikunzhang committed Oct 18, 2023
1 parent c57e80c commit 5b31053
Show file tree
Hide file tree
Showing 27 changed files with 29 additions and 28 deletions.
2 changes: 1 addition & 1 deletion fortran/bobyqa/flint
2 changes: 1 addition & 1 deletion fortran/bobyqa/mlint
2 changes: 1 addition & 1 deletion fortran/cobyla/flint
2 changes: 1 addition & 1 deletion fortran/cobyla/mlint
2 changes: 1 addition & 1 deletion fortran/lincoa/flint
2 changes: 1 addition & 1 deletion fortran/lincoa/mlint
2 changes: 1 addition & 1 deletion fortran/newuoa/flint
2 changes: 1 addition & 1 deletion fortran/newuoa/mlint
14 changes: 8 additions & 6 deletions fortran/tests/makefiles/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ TESTSUITE_DIR := $(TEST_DIR)/$(TESTSUITE)
SRC_DIRS := $(COMMON_DIR) $(SOLVER_DIR) $(TESTSUITE_DIR)
# Driver directory.
DRIVER_DIR := $(TEST_DIR)
# Tools directory
TOOLS_DIR := $(TEST_DIR)/tools

# Sources.
COMMON_SRC := $(shell sed "s/^/\.\/common\//" $(COMMON_DIR)/ffiles.txt)
Expand All @@ -149,7 +151,7 @@ SRC_NO_TEST := $(COMMON_SRC) $(SOLVER_SRC)
HEADERS := $(TEST_SOLVER_DIR)/$(COMMON)/*.h

# The checktest script.
CHCKTST := $(TEST_DIR)/checktest
CHCKTST := $(TOOLS_DIR)/checktest

# Define the tests.
######################################################################################
Expand Down Expand Up @@ -972,23 +974,23 @@ source_%: $(SRC_DIRS)
# https://github.com/zequipe/test_compiler/blob/master/test_solve.f90
@if echo $@ | grep -q "gtest" && echo $(FFLAGS) | grep -q "fast"; then \
printf "\nPreparing the source code for $@.\n" ; \
bash ../gsrc ./ ; \
bash $(TOOLS_DIR)/gsrc ./ ; \
fi
@if echo $@ | grep -q "ftest\|rtest\|dtest"; then \
printf "\nPreparing the source code for $@.\n" ; \
bash ../frdsrc ./ ; \
bash $(TOOLS_DIR)/frdsrc ./ ; \
fi
@if echo $@ | grep -q "stest"; then \
printf "\nPreparing the source code for $@.\n" ; \
bash ../sunsrc ./ ; \
bash $(TOOLS_DIR)/sunsrc ./ ; \
fi
@if echo $@ | grep -q "9test"; then \
printf "\nPreparing the source code for $@.\n" ; \
bash ../9src ./ ; \
bash $(TOOLS_DIR)/9src ./ ; \
fi
@if echo $@ | grep -q "atest\|9test"; then \
printf "\nPreparing the source code for $@.\n" ; \
bash ../a9src ./ ; \
bash $(TOOLS_DIR)/a9src ./ ; \
fi
@printf "Done.\n"

Expand Down
2 changes: 1 addition & 1 deletion fortran/tests/test_cobyla.f90
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module test_solver_mod
!
! Started: September 2021
!
! Last Modified: Thursday, September 28, 2023 PM05:19:01
! Last Modified: Wednesday, October 18, 2023 PM12:58:20
!--------------------------------------------------------------------------------------------------!

implicit none
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fortran/common/flint → fortran/tests/tools/flint
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ FTEST_SOLVER_DIR="$FTEST_DIR"/test."$SOLVER"
TEST_LOG_DIR="$FTEST_SOLVER_DIR"/log

# The checktest script
CHCKTST="$FTEST_DIR"/checktest
CHCKTST="$FTEST_DIR"/tools/checktest

# Remove the old logs.
mkdir -p "$SOLVER_LOG_DIR"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fortran/common/mlint → fortran/tests/tools/mlint
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ MTEST_SOLVER_DIR="$MTEST_DIR"/test."$SOLVER"
TEST_LOG_DIR="$MTEST_SOLVER_DIR"/log

# The checktest script
CHCKTST="$MTEST_DIR"/checktest
CHCKTST="$MTEST_DIR"/tools/checktest

# Remove the old logs.
mkdir -p "$SOLVER_LOG_DIR"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fortran/uobyqa/flint
2 changes: 1 addition & 1 deletion fortran/uobyqa/mlint
1 change: 0 additions & 1 deletion matlab/mex_gateways/tests/9src

This file was deleted.

1 change: 0 additions & 1 deletion matlab/mex_gateways/tests/a9src

This file was deleted.

1 change: 0 additions & 1 deletion matlab/mex_gateways/tests/checktest

This file was deleted.

12 changes: 7 additions & 5 deletions matlab/mex_gateways/tests/makefiles/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ SOLVER_DIR := $(FORTRAN_DIR)/$(SOLVER)
MEXGATE_DIR := $(TEST_DIR)/..
# Source directories.
SRC_DIRS := $(COMMON_DIR) $(SOLVER_DIR)
# Tools directory
TOOLS_DIR := $(TEST_DIR)/tools

# MEX_DEBUGF90 is the name of the MEX file that defines `debug_mod`, which has a common version
# named CMN_DEBUGF90. We should use the MEX version in place of the common one when testing the MEX
Expand All @@ -101,7 +103,7 @@ SRC := $(COMMON_SRC) $(SOLVER_SRC) $(MEXGATE_SRC)
HEADERS := $(TEST_SOLVER_DIR)/$(COMMON)/*.h

# The checktest script.
CHCKTST := $(TEST_DIR)/checktest
CHCKTST := $(TOOLS_DIR)/checktest

# Define the tests.
######################################################################################
Expand Down Expand Up @@ -611,19 +613,19 @@ source_%: $(SRC_DIRS)
\) -exec rm {} \; # Cleaning up; important!!!
@if echo $@ | grep -q "stest"; then \
printf "\nPreparing the source code for $@.\n" ; \
bash ../sunsrc ./ ; \
bash $(TOOLS_DIR)/sunsrc ./ ; \
fi
@if echo $@ | grep -q "9test"; then \
printf "\nPreparing the source code for $@.\n" ; \
bash ../9src ./ ; \
bash $(TOOLS_DIR)/9src ./ ; \
fi
@if echo $@ | grep -q "atest\|9test"; then \
printf "\nPreparing the source code for $@.\n" ; \
bash ../a9src ./ ; \
bash $(TOOLS_DIR)/a9src ./ ; \
fi
@if echo $@ | grep -q "stest\|9test"; then \
printf "\nPreparing the source code for $@.\n" ; \
bash ../s9src ./ ; \
bash $(TOOLS_DIR)/s9src ./ ; \
fi
@printf "Done.\n"

Expand Down
1 change: 0 additions & 1 deletion matlab/mex_gateways/tests/sunsrc

This file was deleted.

1 change: 1 addition & 0 deletions matlab/mex_gateways/tests/tools

0 comments on commit 5b31053

Please sign in to comment.