File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # For some reason, the return code of emacs isn't correctly communicated back to the script.
2+ # Instead, we store the stdout/stderr and grep for "FAILED".
3+ function Run-Test {
4+ param ( $TestName )
5+ $command = " emacs --batch -L build -L test -l test-helper -l $ ( $TestName ) -test -f ert-run-tests-batch-and-exit"
6+ $output = Invoke-Expression " $command 2>&1"
7+ Write-Host $output
8+ if ($output | select-string - Pattern " FAILED" ) {
9+ exit 1
10+ }
11+ }
12+
13+ Run- Test - TestName " refcount"
14+ Run- Test - TestName " reference"
15+ Run- Test - TestName " repository"
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ add_subdirectory(src)
1313
1414enable_testing ()
1515
16+ # NOTE: These test names must be replicated in .appveyor-script.ps1
17+ # for the Windows CI. Fixing this is still TODO.
1618set (EGIT_TESTS refcount reference repository)
1719
1820foreach (test ${EGIT_TESTS} )
Original file line number Diff line number Diff line change 1+ environment :
2+ matrix :
3+ - GENERATOR : " MinGW Makefiles"
4+
5+ install :
6+ - git submodule update --init --recursive
7+ # Use the chocolatey emacs64 package for testing
8+ # TODO: Any better solutions? Build Emacs ourselves? What about 64-bit?
9+ - cinst emacs64
10+
11+ before_build :
12+ - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
13+ - set PATH=C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
14+
15+ build_script :
16+ - mkdir build
17+ - cd build
18+ - cmake .. -G"%GENERATOR%"
19+ - cmake --build .
20+ - cd ..
21+
22+ test_script :
23+ - ps : .\.appveyor-script.ps1
Original file line number Diff line number Diff line change @@ -5,13 +5,21 @@ set_target_properties(egit2 PROPERTIES C_STANDARD 99)
55
66# Emacs looks for .so on linux and OSX.
77# By default CMake builds .dylib on OSX, so override that.
8- # Windows is TODO
9- set_target_properties (egit2 PROPERTIES SUFFIX .so )
8+ if (APPLE )
9+ set_target_properties (egit2 PROPERTIES SUFFIX .so )
10+ endif (APPLE )
11+
12+ if (WIN32 )
13+ set_target_properties (egit2 PROPERTIES PREFIX lib )
14+ endif (WIN32 )
1015
1116target_link_libraries (egit2 git2 )
1217target_include_directories (egit2 SYSTEM PRIVATE "${libgit2_SOURCE_DIR} /include" )
1318target_include_directories (egit2 SYSTEM PRIVATE "${CMAKE_CURRENT_SOURCE_DIR} /../uthash" )
14- target_compile_options (egit2 PRIVATE -Wall -Wextra )
19+
20+ if (CMAKE_COMPILER_IS_GNUCC)
21+ target_compile_options (egit2 PRIVATE -Wall -Wextra )
22+ endif (CMAKE_COMPILER_IS_GNUCC )
1523
1624add_custom_command (TARGET egit2 POST_BUILD COMMAND
1725 ${CMAKE_COMMAND} -E copy $<TARGET_FILE :egit2 > "${CMAKE_CURRENT_BINARY_DIR} /.." )
You can’t perform that action at this time.
0 commit comments