Skip to content

Commit

Permalink
Pass executable name from CMake
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Oct 23, 2016
1 parent 4717417 commit e2bfb74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gammu/CMakeTests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ endif (WITH_BACKUP)


configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/test-incoming.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/test-incoming.sh" ESCAPE_QUOTES)
add_test(NAME "gammu-incoming" COMMAND "${SH_BIN}" "${CMAKE_CURRENT_BINARY_DIR}/test-incoming.sh" "${CMAKE_CURRENT_BINARY_DIR}")
add_test(NAME "gammu-incoming" COMMAND "${SH_BIN}" "${CMAKE_CURRENT_BINARY_DIR}/test-incoming.sh" "${CMAKE_CURRENT_BINARY_DIR}/gammu${CMAKE_EXECUTABLE_SUFFIX}" "${CMAKE_CURRENT_BINARY_DIR}")
set_tests_properties("gammu-incoming" PROPERTIES PASS_REGULAR_EXPRESSION "incoming call from \"\\+800123456\"")

gammu_test(monitor GammuTel 1)
Expand Down
4 changes: 2 additions & 2 deletions gammu/test-incoming.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
set -x
set -e

CMAKE_CURRENT_BINARY_DIR="$1"
EXE="$1"
CMAKE_CURRENT_BINARY_DIR="$2"

cd "$CMAKE_CURRENT_BINARY_DIR"

EXE="$CMAKE_CURRENT_BINARY_DIR/gammu@CMAKE_EXECUTABLE_SUFFIX@"
CONFIG="$CMAKE_CURRENT_BINARY_DIR/.gammurc"
DUMMY="$CMAKE_CURRENT_BINARY_DIR/.gammu-dummy"

Expand Down

0 comments on commit e2bfb74

Please sign in to comment.