From 2d7d854a97a221b2d556b4edd1d5b3dd37330c07 Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Sat, 7 Dec 2024 14:23:03 +0000 Subject: [PATCH] Allow all tests to be skipped if SKIP_ALL_TESTS is 1. --- tests/Bug_-_Display_length_at_magnitude_boundary_-_Bytes.test | 3 +++ tests/Bug_-_Display_length_at_magnitude_boundary_-_Rate.test | 3 +++ tests/Bug_-_Install_all_files.test | 3 +++ tests/Display_-_--average-rate.test | 3 +++ tests/Display_-_--bits.test | 3 +++ tests/Display_-_--buffer-percent.test | 3 +++ tests/Display_-_--bytes.test | 3 +++ tests/Display_-_--eta_-_plausible_values.test | 3 +++ tests/Display_-_--fineta_-_plausible_values.test | 3 +++ tests/Display_-_--last-written.test | 3 +++ tests/Display_-_--numeric.test | 3 +++ tests/Display_-_--numeric_--bytes.test | 3 +++ tests/Display_-_--numeric_--bytes_--line-mode.test | 3 +++ tests/Display_-_--numeric_--timer.test | 3 +++ tests/Display_-_--progress_-_basic_movement.test | 3 +++ tests/Display_-_--progress_-_increasing.test | 3 +++ tests/Display_-_--quiet.test | 3 +++ tests/Display_-_--rate_-_displayed_value_changes.test | 3 +++ tests/Display_-_--timer_-_displayed_value_changes.test | 3 +++ tests/General_-_--pidfile.test | 3 +++ tests/General_-_--size_argument_handling.test | 3 +++ tests/Integrity_-_Basic.test | 3 +++ tests/Integrity_-_Binary_data.test | 3 +++ tests/Integrity_-_From_bursty_source.test | 3 +++ tests/Integrity_-_Large_file_support.test | 3 +++ tests/Integrity_-_On_output_pipe_close.test | 3 +++ tests/Integrity_-_When_adjusted_remotely.test | 3 +++ tests/Memory_safety_-_Basic.test | 3 +++ tests/Memory_safety_-_Process_title.test | 3 +++ tests/Memory_safety_-_Remote_control_receiver.test | 3 +++ tests/Memory_safety_-_Remote_control_sender.test | 3 +++ tests/Memory_safety_-_Watchfd.test | 3 +++ tests/Modifiers_-_--direct-io.test | 3 +++ tests/Modifiers_-_--force.test | 3 +++ tests/Modifiers_-_--interval.test | 3 +++ tests/Modifiers_-_--line-mode.test | 3 +++ tests/Modifiers_-_--size.test | 3 +++ tests/Modifiers_-_--size_from_file_size.test | 3 +++ tests/Modifiers_-_--sync.test | 3 +++ tests/Terminal_-_Detect_width.test | 3 +++ tests/Transfer_-_--rate-limit.test | 3 +++ tests/Transfer_-_--remote.test | 3 +++ tests/Transfer_-_--stop-at-size.test | 3 +++ tests/Watchfd_-_Multiple_descriptors.test | 3 +++ tests/Watchfd_-_Single_descriptor.test | 3 +++ 45 files changed, 135 insertions(+) diff --git a/tests/Bug_-_Display_length_at_magnitude_boundary_-_Bytes.test b/tests/Bug_-_Display_length_at_magnitude_boundary_-_Bytes.test index 46a8fcb..e52d88e 100755 --- a/tests/Bug_-_Display_length_at_magnitude_boundary_-_Bytes.test +++ b/tests/Bug_-_Display_length_at_magnitude_boundary_-_Bytes.test @@ -4,6 +4,9 @@ # 1MiB, described here: # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586763 +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Bug_-_Display_length_at_magnitude_boundary_-_Rate.test b/tests/Bug_-_Display_length_at_magnitude_boundary_-_Rate.test index 096fc5c..0062f91 100755 --- a/tests/Bug_-_Display_length_at_magnitude_boundary_-_Rate.test +++ b/tests/Bug_-_Display_length_at_magnitude_boundary_-_Rate.test @@ -3,6 +3,9 @@ # This is the same as the other display length at magnitude boundary check, # but for rate, not bytes transferred. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + # Dummy assignments for "shellcheck". true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Bug_-_Install_all_files.test b/tests/Bug_-_Install_all_files.test index 1fcd2e7..afe3d8a 100755 --- a/tests/Bug_-_Install_all_files.test +++ b/tests/Bug_-_Install_all_files.test @@ -2,6 +2,9 @@ # # Test that "make install" installs the expected minimum set of files. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--average-rate.test b/tests/Display_-_--average-rate.test index bd9bb6c..55dd31d 100755 --- a/tests/Display_-_--average-rate.test +++ b/tests/Display_-_--average-rate.test @@ -3,6 +3,9 @@ # Check that the average transfer rate counter changes, but not more than it # should. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--bits.test b/tests/Display_-_--bits.test index 7a3c8ec..2aadda1 100755 --- a/tests/Display_-_--bits.test +++ b/tests/Display_-_--bits.test @@ -2,6 +2,9 @@ # # Check that the byte counter counts in bits when --bits is selected. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--buffer-percent.test b/tests/Display_-_--buffer-percent.test index d318770..cc80992 100755 --- a/tests/Display_-_--buffer-percent.test +++ b/tests/Display_-_--buffer-percent.test @@ -2,6 +2,9 @@ # # Check that "--buffer-percent" displays correctly. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--bytes.test b/tests/Display_-_--bytes.test index 5581e5f..3bb6b26 100755 --- a/tests/Display_-_--bytes.test +++ b/tests/Display_-_--bytes.test @@ -2,6 +2,9 @@ # # Check that the byte counter counts. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--eta_-_plausible_values.test b/tests/Display_-_--eta_-_plausible_values.test index a04c87a..2d43811 100755 --- a/tests/Display_-_--eta_-_plausible_values.test +++ b/tests/Display_-_--eta_-_plausible_values.test @@ -2,6 +2,9 @@ # # Check that the estimated time counter counts. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--fineta_-_plausible_values.test b/tests/Display_-_--fineta_-_plausible_values.test index 90bab87..46af57c 100755 --- a/tests/Display_-_--fineta_-_plausible_values.test +++ b/tests/Display_-_--fineta_-_plausible_values.test @@ -2,6 +2,9 @@ # # Check that the estimated time counter can show the end time of day. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--last-written.test b/tests/Display_-_--last-written.test index 83d8073..f20d7f3 100755 --- a/tests/Display_-_--last-written.test +++ b/tests/Display_-_--last-written.test @@ -2,6 +2,9 @@ # # Check that "--last-written" works. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--numeric.test b/tests/Display_-_--numeric.test index d77b326..42ca1ce 100755 --- a/tests/Display_-_--numeric.test +++ b/tests/Display_-_--numeric.test @@ -2,6 +2,9 @@ # # Check that numeric output outputs some percentages. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--numeric_--bytes.test b/tests/Display_-_--numeric_--bytes.test index 89795c3..7b3bc0b 100755 --- a/tests/Display_-_--numeric_--bytes.test +++ b/tests/Display_-_--numeric_--bytes.test @@ -3,6 +3,9 @@ # Check that numeric output gives a byte count instead of a percentage when # used with -b. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--numeric_--bytes_--line-mode.test b/tests/Display_-_--numeric_--bytes_--line-mode.test index 4911d7f..89677b5 100755 --- a/tests/Display_-_--numeric_--bytes_--line-mode.test +++ b/tests/Display_-_--numeric_--bytes_--line-mode.test @@ -3,6 +3,9 @@ # Check that numeric output shows line counts instead of percentages, when # used in line mode together with bytes mode. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--numeric_--timer.test b/tests/Display_-_--numeric_--timer.test index d425c55..48a712d 100755 --- a/tests/Display_-_--numeric_--timer.test +++ b/tests/Display_-_--numeric_--timer.test @@ -2,6 +2,9 @@ # # Check that numeric output gives a timer when used with -t. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--progress_-_basic_movement.test b/tests/Display_-_--progress_-_basic_movement.test index e4a4a03..aa97cd1 100755 --- a/tests/Display_-_--progress_-_basic_movement.test +++ b/tests/Display_-_--progress_-_basic_movement.test @@ -2,6 +2,9 @@ # # Check that the progress bar moves when data is coming in. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--progress_-_increasing.test b/tests/Display_-_--progress_-_increasing.test index ab54e1a..ad4aa53 100755 --- a/tests/Display_-_--progress_-_increasing.test +++ b/tests/Display_-_--progress_-_increasing.test @@ -2,6 +2,9 @@ # # Check that the progress bar increases in size when data is coming in. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--quiet.test b/tests/Display_-_--quiet.test index 6981bb1..df5e4fa 100755 --- a/tests/Display_-_--quiet.test +++ b/tests/Display_-_--quiet.test @@ -2,6 +2,9 @@ # # Check that the -q option shuts everything up. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--rate_-_displayed_value_changes.test b/tests/Display_-_--rate_-_displayed_value_changes.test index 178e341..da604b4 100755 --- a/tests/Display_-_--rate_-_displayed_value_changes.test +++ b/tests/Display_-_--rate_-_displayed_value_changes.test @@ -2,6 +2,9 @@ # # Check that the transfer rate counter changes. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Display_-_--timer_-_displayed_value_changes.test b/tests/Display_-_--timer_-_displayed_value_changes.test index d006601..0f6dd4d 100755 --- a/tests/Display_-_--timer_-_displayed_value_changes.test +++ b/tests/Display_-_--timer_-_displayed_value_changes.test @@ -2,6 +2,9 @@ # # Check that the elapsed time counter does count up. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/General_-_--pidfile.test b/tests/General_-_--pidfile.test index e19e6ce..c0e290b 100755 --- a/tests/General_-_--pidfile.test +++ b/tests/General_-_--pidfile.test @@ -3,6 +3,9 @@ # Check that the process ID can be written to a file as described in the # manual. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/General_-_--size_argument_handling.test b/tests/General_-_--size_argument_handling.test index 8fbe42b..680c298 100755 --- a/tests/General_-_--size_argument_handling.test +++ b/tests/General_-_--size_argument_handling.test @@ -2,6 +2,9 @@ # # Check that size arguments are processed correctly. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" # Pass size argument $1 and check that the last reported number is $2. diff --git a/tests/Integrity_-_Basic.test b/tests/Integrity_-_Basic.test index ba81d2f..e33539b 100755 --- a/tests/Integrity_-_Basic.test +++ b/tests/Integrity_-_Basic.test @@ -2,6 +2,9 @@ # # Check that data can be just passed straight through. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" inputString="TESTING" diff --git a/tests/Integrity_-_Binary_data.test b/tests/Integrity_-_Binary_data.test index e89e2ff..84e4158 100755 --- a/tests/Integrity_-_Binary_data.test +++ b/tests/Integrity_-_Binary_data.test @@ -3,6 +3,9 @@ # Transfer a large chunk of data through pv and check data correctness # afterwards. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Integrity_-_From_bursty_source.test b/tests/Integrity_-_From_bursty_source.test index dd5aef3..b91fcbe 100755 --- a/tests/Integrity_-_From_bursty_source.test +++ b/tests/Integrity_-_From_bursty_source.test @@ -3,6 +3,9 @@ # Transfer a large chunk of data through pv using pipes, sending it in a # bursty fashion, and check data correctness afterwards. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Integrity_-_Large_file_support.test b/tests/Integrity_-_Large_file_support.test index 636b306..c7fb3da 100755 --- a/tests/Integrity_-_Large_file_support.test +++ b/tests/Integrity_-_Large_file_support.test @@ -2,6 +2,9 @@ # # Make sure that files larger than 2GB are supported. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Integrity_-_On_output_pipe_close.test b/tests/Integrity_-_On_output_pipe_close.test index ba026ef..761ee55 100755 --- a/tests/Integrity_-_On_output_pipe_close.test +++ b/tests/Integrity_-_On_output_pipe_close.test @@ -2,6 +2,9 @@ # # Check that there is no SIGPIPE or dropped data on bigger data transfers. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" # We nead GNU head. On some platforms it is named ghead instead of head. diff --git a/tests/Integrity_-_When_adjusted_remotely.test b/tests/Integrity_-_When_adjusted_remotely.test index cf4947b..f48a252 100755 --- a/tests/Integrity_-_When_adjusted_remotely.test +++ b/tests/Integrity_-_When_adjusted_remotely.test @@ -3,6 +3,9 @@ # Try repeatedly messaging a transfer process, and make sure the data stays # intact. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Memory_safety_-_Basic.test b/tests/Memory_safety_-_Basic.test index 380606b..93352c3 100755 --- a/tests/Memory_safety_-_Basic.test +++ b/tests/Memory_safety_-_Basic.test @@ -3,6 +3,9 @@ # Run valgrind's memory checker against a process using various different # transfer options. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${sourcePath:?not set - call this from 'make check'}" true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Memory_safety_-_Process_title.test b/tests/Memory_safety_-_Process_title.test index d6b3b80..bd0b1c7 100755 --- a/tests/Memory_safety_-_Process_title.test +++ b/tests/Memory_safety_-_Process_title.test @@ -3,6 +3,9 @@ # Run valgrind's memory checker against a process that sets is process # title. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${sourcePath:?not set - call this from 'make check'}" true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Memory_safety_-_Remote_control_receiver.test b/tests/Memory_safety_-_Remote_control_receiver.test index 44932bc..a1dcda6 100755 --- a/tests/Memory_safety_-_Remote_control_receiver.test +++ b/tests/Memory_safety_-_Remote_control_receiver.test @@ -2,6 +2,9 @@ # # Run valgrind's memory checker while receiving remote control commands. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${sourcePath:?not set - call this from 'make check'}" true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Memory_safety_-_Remote_control_sender.test b/tests/Memory_safety_-_Remote_control_sender.test index 446e35f..95d6300 100755 --- a/tests/Memory_safety_-_Remote_control_sender.test +++ b/tests/Memory_safety_-_Remote_control_sender.test @@ -3,6 +3,9 @@ # Run valgrind's memory checker while using remote control to control # another process. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${sourcePath:?not set - call this from 'make check'}" true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Memory_safety_-_Watchfd.test b/tests/Memory_safety_-_Watchfd.test index 6386628..d8d91b4 100755 --- a/tests/Memory_safety_-_Watchfd.test +++ b/tests/Memory_safety_-_Watchfd.test @@ -3,6 +3,9 @@ # Run valgrind's memory checker against a process using the --watchfd # option. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${sourcePath:?not set - call this from 'make check'}" true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Modifiers_-_--direct-io.test b/tests/Modifiers_-_--direct-io.test index b913208..fd39079 100755 --- a/tests/Modifiers_-_--direct-io.test +++ b/tests/Modifiers_-_--direct-io.test @@ -5,6 +5,9 @@ # doesn't check that O_DIRECT is actually being used, it just checks that # data is not being corrupted. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Modifiers_-_--force.test b/tests/Modifiers_-_--force.test index 50f5c39..7ac80bb 100755 --- a/tests/Modifiers_-_--force.test +++ b/tests/Modifiers_-_--force.test @@ -3,6 +3,9 @@ # Check that the progress bar is produced when "--force" is used, and is not # when it is not, providing stderr is a file. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Modifiers_-_--interval.test b/tests/Modifiers_-_--interval.test index a94e520..a92a9db 100755 --- a/tests/Modifiers_-_--interval.test +++ b/tests/Modifiers_-_--interval.test @@ -2,6 +2,9 @@ # # Check that the update interval can be set. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Modifiers_-_--line-mode.test b/tests/Modifiers_-_--line-mode.test index 7c1ca2a..a6aa7c6 100755 --- a/tests/Modifiers_-_--line-mode.test +++ b/tests/Modifiers_-_--line-mode.test @@ -2,6 +2,9 @@ # # Check that line mode counts lines instead of bytes. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Modifiers_-_--size.test b/tests/Modifiers_-_--size.test index ec82f02..c82c67d 100755 --- a/tests/Modifiers_-_--size.test +++ b/tests/Modifiers_-_--size.test @@ -2,6 +2,9 @@ # # Check that "--size" affects the percentage shown. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" diff --git a/tests/Modifiers_-_--size_from_file_size.test b/tests/Modifiers_-_--size_from_file_size.test index a28dab6..22ec04b 100755 --- a/tests/Modifiers_-_--size_from_file_size.test +++ b/tests/Modifiers_-_--size_from_file_size.test @@ -3,6 +3,9 @@ # Similar to the "--size" check but, instead, using another file's size with # "--size @". +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Modifiers_-_--sync.test b/tests/Modifiers_-_--sync.test index 9f586a4..95a5cab 100755 --- a/tests/Modifiers_-_--sync.test +++ b/tests/Modifiers_-_--sync.test @@ -5,6 +5,9 @@ # check that fdatasync() is actually being called, it just checks that data # is not being corrupted. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Terminal_-_Detect_width.test b/tests/Terminal_-_Detect_width.test index 929aea4..7955326 100755 --- a/tests/Terminal_-_Detect_width.test +++ b/tests/Terminal_-_Detect_width.test @@ -2,6 +2,9 @@ # # Check that the terminal width is detected on startup. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Transfer_-_--rate-limit.test b/tests/Transfer_-_--rate-limit.test index 3aedf0d..5bd05bd 100755 --- a/tests/Transfer_-_--rate-limit.test +++ b/tests/Transfer_-_--rate-limit.test @@ -2,6 +2,9 @@ # # A simple test of rate limiting. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" # Transfer 102 bytes at 100 bytes/sec. It should take at least 1 second. diff --git a/tests/Transfer_-_--remote.test b/tests/Transfer_-_--remote.test index 6df9403..f11088a 100755 --- a/tests/Transfer_-_--remote.test +++ b/tests/Transfer_-_--remote.test @@ -2,6 +2,9 @@ # # Try changing the format of a transfer remotely. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Transfer_-_--stop-at-size.test b/tests/Transfer_-_--stop-at-size.test index da079c8..73eef43 100755 --- a/tests/Transfer_-_--stop-at-size.test +++ b/tests/Transfer_-_--stop-at-size.test @@ -2,6 +2,9 @@ # # Make sure -S stops at the given size. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Watchfd_-_Multiple_descriptors.test b/tests/Watchfd_-_Multiple_descriptors.test index 2de3f1c..284a90d 100755 --- a/tests/Watchfd_-_Multiple_descriptors.test +++ b/tests/Watchfd_-_Multiple_descriptors.test @@ -2,6 +2,9 @@ # # Check that watching a process's file descriptors works as expected. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}" diff --git a/tests/Watchfd_-_Single_descriptor.test b/tests/Watchfd_-_Single_descriptor.test index df1ed9a..44b5cfa 100755 --- a/tests/Watchfd_-_Single_descriptor.test +++ b/tests/Watchfd_-_Single_descriptor.test @@ -2,6 +2,9 @@ # # Check that watching a single file descriptor works as expected. +# Allow all tests to be skipped, e.g. during a release build +test "${SKIP_ALL_TESTS}" = "1" && exit 77 + true "${testSubject:?not set - call this from 'make check'}" true "${workFile1:?not set - call this from 'make check'}" true "${workFile2:?not set - call this from 'make check'}"