Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple cmake macros #127

Merged
merged 16 commits into from Feb 28, 2020
Merged

multiple cmake macros #127

merged 16 commits into from Feb 28, 2020

Conversation

floweisshardt
Copy link
Owner

No description provided.

@floweisshardt
Copy link
Owner Author

floweisshardt commented Feb 28, 2020

commands for debugging cmake dependencies:

add to CMakeLists.txt

set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_DEBUG_MODE 1)

build in terminal

catkin build --force-cmake atf_core atf_test --no-deps

write to file (for better readability)

catkin build --force-cmake atf_core atf_test --no-deps > /tmp/deps 2>&1

show target on terminal (without dependencies):

cd ~/git/atf/build/atf_test
cmake --build . --target help|grep atf_test

run single cmake target

catkin build --this --no-deps --verbose --make-args run_tests_atf_test_rostest_test_generated_atf_test_generation_config_basic.yaml_cleaning.test

@floweisshardt
Copy link
Owner Author

PR is working on kinetic but not on melodic. Somehow fails after the recording step

Built target atf_atf_test_atf_test_generation_config.yaml_cleaning
/usr/bin/make -f CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c0_r1_e0_s0_0.test.dir/build.make CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c0_r1_e0_s0_0.test.dir/depend
/usr/bin/make -f CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test.dir/build.make CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test.dir/depend
make[3]: Entering directory '/root/target_ws/build/atf_test'
cd /root/target_ws/build/atf_test && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /root/target_ws/src/atf/atf_test /root/target_ws/src/atf/atf_test /root/target_ws/build/atf_test /root/target_ws/build/atf_test /root/target_ws/build/atf_test/CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c0_r1_e0_s0_0.test.dir/DependInfo.cmake --color=
make[3]: Entering directory '/root/target_ws/build/atf_test'
cd /root/target_ws/build/atf_test && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /root/target_ws/src/atf/atf_test /root/target_ws/src/atf/atf_test /root/target_ws/build/atf_test /root/target_ws/build/atf_test /root/target_ws/build/atf_test/CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test.dir/DependInfo.cmake --color=
Dependee "/root/target_ws/build/atf_test/CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test.dir/DependInfo.cmake" is newer than depender "/root/target_ws/build/atf_test/CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test.dir/depend.internal".
Dependee "/root/target_ws/build/atf_test/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/root/target_ws/build/atf_test/CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test.dir/depend.internal".
Scanning dependencies of target _run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test
Dependee "/root/target_ws/build/atf_test/CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c0_r1_e0_s0_0.test.dir/DependInfo.cmake" is newer than depender "/root/target_ws/build/atf_test/CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c0_r1_e0_s0_0.test.dir/depend.internal".
Dependee "/root/target_ws/build/atf_test/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/root/target_ws/build/atf_test/CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c0_r1_e0_s0_0.test.dir/depend.internal".
Scanning dependencies of target _run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c0_r1_e0_s0_0.test
make[3]: Leaving directory '/root/target_ws/build/atf_test'
/usr/bin/make -f CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test.dir/build.make CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test.dir/build
make[3]: Leaving directory '/root/target_ws/build/atf_test'
/usr/bin/make -f CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c0_r1_e0_s0_0.test.dir/build.make CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c0_r1_e0_s0_0.test.dir/build
make[3]: Entering directory '/root/target_ws/build/atf_test'
catkin_generated/env_cached.sh /usr/bin/python2 /opt/ros/melodic/share/catkin/cmake/test/run_tests.py /root/target_ws/build/atf_test/test_results/atf_test/rostest-test_generated_atf_test_generation_config.xml "/opt/ros/melodic/share/rostest/cmake/../../../bin/rostest --pkgdir=/root/target_ws/src/atf/atf_test --package=atf_test --results-filename test_generated_atf_test_generation_config.xml --results-base-dir \"/root/target_ws/build/atf_test/test_results\" /root/target_ws/build/atf_test/test_generated/atf_test_generation_config.yaml/recording_ts0_c1_r0_e0_s0_0.test "
make[3]: Entering directory '/root/target_ws/build/atf_test'
catkin_generated/env_cached.sh /usr/bin/python2 /opt/ros/melodic/share/catkin/cmake/test/run_tests.py /root/target_ws/build/atf_test/test_results/atf_test/rostest-test_generated_atf_test_generation_config.xml "/opt/ros/melodic/share/rostest/cmake/../../../bin/rostest --pkgdir=/root/target_ws/src/atf/atf_test --package=atf_test --results-filename test_generated_atf_test_generation_config.xml --results-base-dir \"/root/target_ws/build/atf_test/test_results\" /root/target_ws/build/atf_test/test_generated/atf_test_generation_config.yaml/recording_ts0_c0_r1_e0_s0_0.test "
Traceback (most recent call last):
  File "/opt/ros/melodic/share/catkin/cmake/test/run_tests.py", line 42, in <module>
-- run_tests.py: execute commands
  /opt/ros/melodic/share/rostest/cmake/../../../bin/rostest --pkgdir=/root/target_ws/src/atf/atf_test --package=atf_test --results-filename test_generated_atf_test_generation_config.xml --results-base-dir "/root/target_ws/build/atf_test/test_results" /root/target_ws/build/atf_test/test_generated/atf_test_generation_config.yaml/recording_ts0_c0_r1_e0_s0_0.test 
    sys.exit(main())
  File "/opt/ros/melodic/share/catkin/cmake/test/run_tests.py", line 19, in main
    remove_junit_result(args.results)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/catkin/test_results.py", line 45, in remove_junit_result
    os.remove(filename)
OSError: [Errno 2] No such file or directory: '/root/target_ws/build/atf_test/test_results/atf_test/rostest-test_generated_atf_test_generation_config.xml'
CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test.dir/build.make:57: recipe for target 'CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test' failed
make[3]: Leaving directory '/root/target_ws/build/atf_test'
CMakeFiles/Makefile2:344: recipe for target 'CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test.dir/all' failed
make[3]: *** [CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test] Error 1
make[2]: *** [CMakeFiles/_run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c1_r0_e0_s0_0.test.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
... logging to /root/.ros/log/rostest-b0d45f6a1cc2-8009.log
[ROSUNIT] Outputting test results to /root/target_ws/build/atf_test/test_results/atf_test/rostest-test_generated_atf_test_generation_config.xml
package_name: atf_test
test_generation_config_file: atf/test_generation_config.yaml
test_name: ts0_c0_r1_e0_s0_0
[INFO] [1582929196.630527]: waiting for smach container in test_sm to be ready...
[INFO] [1582929200.219829]: ...smach container in sm_test is ready.
[INFO] [1582929201.224901]: starting testblock 'testblock_small'
[INFO] [1582929201.276691]: Circ
[INFO] [1582929204.328451]: setting user result for testblock 'testblock_small'
[INFO] [1582929204.329896]: stopping testblock 'testblock_small'
[INFO] [1582929204.331317]: starting testblock 'testblock_large'
[INFO] [1582929204.332911]: Circ
[INFO] [1582929209.384422]: setting user result for testblock 'testblock_large'
[INFO] [1582929209.385669]: stopping testblock 'testblock_large'
[INFO] [1582929209.386868]: shutting down atf application
[INFO] [1582929209.388215]: no user result set for testblock 'testblock_small'
[INFO] [1582929209.389032]: stopping testblock 'testblock_small'
[INFO] [1582929209.390044]: no user result set for testblock 'testblock_large'
[INFO] [1582929209.391145]: stopping testblock 'testblock_large'
[INFO] [1582929209.392581]: waiting for all states to be in a terminal state
[INFO] [1582929209.494113]: atf application is shutdown.
[WARN] [1582929209.600494]: Inbound TCP/IP connection failed: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details.
[Testcase: testatf_recording_ts0_c0_r1_e0_s0_0] ... ok
[ROSTEST]-----------------------------------------------------------------------
[atf_test.rosunit-atf_recording_ts0_c0_r1_e0_s0_0/test_Recording][passed]
SUMMARY
 * RESULT: SUCCESS
 * TESTS: 1
 * ERRORS: 0
 * FAILURES: 0
rostest log file is in /root/.ros/log/rostest-b0d45f6a1cc2-8009.log
-- run_tests.py: verify result "/root/target_ws/build/atf_test/test_results/atf_test/rostest-test_generated_atf_test_generation_config.xml"
make[3]: Leaving directory '/root/target_ws/build/atf_test'
Built target _run_tests_atf_test_rostest_test_generated_atf_test_generation_config.yaml_recording_ts0_c0_r1_e0_s0_0.test
make[2]: Leaving directory '/root/target_ws/build/atf_test'
CMakeFiles/Makefile2:963: recipe for target 'CMakeFiles/run_tests.dir/rule' failed
make[1]: Leaving directory '/root/target_ws/build/atf_test'
make[1]: *** [CMakeFiles/run_tests.dir/rule] Error 2
make: *** [run_tests] Error 2
Makefile:513: recipe for target 'run_tests' failed
cd /root/target_ws/build/atf_test; catkin build --get-env atf_test | catkin env -si  /usr/bin/make run_tests --jobserver-fds=6,7 -j; cd -
Failed     << atf_test:make                       [ Exited with code 2 ]
Failed    <<< atf_test                            [ 30.0 seconds ]
[build] Summary: 7 of 8 packages succeeded.
[build]   Ignored:   1 packages were skipped or are blacklisted.
[build]   Warnings:  None.
[build]   Abandoned: None.
[build]   Failed:    1 packages failed.
[build] Runtime: 35.0 seconds total.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Function 'run_target_test' returned with code '1' after 0 min 35 sec
The command ".industrial_ci/travis.sh" exited with 1.
Done. Your build exited with 1.

@floweisshardt
Copy link
Owner Author

finally solved via 55d89ab

@floweisshardt floweisshardt merged commit 1a6feb2 into master Feb 28, 2020
@floweisshardt floweisshardt deleted the feature/multiple_cmake_macros branch July 21, 2020 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant