File tree Expand file tree Collapse file tree 4 files changed +92
-0
lines changed Expand file tree Collapse file tree 4 files changed +92
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,14 @@ function(cc_test name)
33
33
34
34
list (APPEND cc_test_DEPENDS gmock gtest gtest_main )
35
35
36
+ # Include Foundation and Security frameworks, as multiple tests require them
37
+ # when running on Mac.
38
+ if (APPLE )
39
+ list (APPEND cc_test_DEPENDS
40
+ "-framework Foundation"
41
+ "-framework Security" )
42
+ endif ()
43
+
36
44
add_executable (${name} ${cc_test_SOURCES} )
37
45
add_test (${name} ${name} )
38
46
target_include_directories (${name}
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ #
3
+ # Copyright 2019 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+ # Builds and runs the tests, meant to be used on a Linux environment.
18
+
19
+ # Fail on any error.
20
+ set -e
21
+ # Display commands being run.
22
+ set -x
23
+
24
+ # Make a directory to work in
25
+ mkdir linux_build
26
+ cd linux_build
27
+
28
+ # Configure cmake with tests enabled
29
+ cmake .. -DFIREBASE_CPP_BUILD_TESTS=ON
30
+
31
+ # Build the SDK and the tests
32
+ cmake --build .
33
+
34
+ # Run the tests
35
+ ctest
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ #
3
+ # Copyright 2019 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+ # Builds and runs the tests, meant to be used on a Linux environment.
18
+
19
+ # Fail on any error.
20
+ set -e
21
+ # Display commands being run.
22
+ set -x
23
+
24
+ # Make a directory to work in
25
+ mkdir macos_build
26
+ cd macos_build
27
+
28
+ # Configure cmake with tests enabled
29
+ cmake .. -DFIREBASE_CPP_BUILD_TESTS=ON
30
+
31
+ # Build the SDK and the tests
32
+ cmake --build .
33
+
34
+ # Run the tests
35
+ ctest
Original file line number Diff line number Diff line change
1
+ :: Make a directory to work in
2
+ mkdir windows_build
3
+ cd windows_build
4
+
5
+ :: Configure cmake with tests enabled
6
+ cmake .. -DFIREBASE_CPP_BUILD_TESTS=ON
7
+
8
+ :: Build the SDK and the tests
9
+ cmake --build .
10
+
11
+ :: Run the tests
12
+ ctest
13
+
14
+ exit /b %ERRORLEVEL%
You can’t perform that action at this time.
0 commit comments