From 9e2f997e877da502a8c9166432455c93f0021554 Mon Sep 17 00:00:00 2001 From: Yutaro Sakamoto Date: Mon, 15 Dec 2025 01:33:04 +0000 Subject: [PATCH 1/3] test: split test cases --- .github/workflows/coverage.yml | 2 +- .github/workflows/pull-request.yml | 2 ++ .github/workflows/push.yml | 3 ++- .gitignore | 1 + tests/Makefile.am | 17 ++++++++----- tests/Makefile.in | 24 ++++++++++++++----- tests/file-lock.at | 5 ---- tests/file-lock2.at | 7 ++++++ .../lock-mode-automatic.at | 0 .../lock-mode-clause.at | 0 .../old-file.at | 0 .../open-input.at | 0 .../release-lock.at | 0 13 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 tests/file-lock2.at rename tests/{file-lock.src => file-lock2.src}/lock-mode-automatic.at (100%) rename tests/{file-lock.src => file-lock2.src}/lock-mode-clause.at (100%) rename tests/{file-lock.src => file-lock2.src}/old-file.at (100%) rename tests/{file-lock.src => file-lock2.src}/open-input.at (100%) rename tests/{file-lock.src => file-lock2.src}/release-lock.at (100%) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 762ab48a..3e5b7511 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -41,7 +41,7 @@ jobs: - name: Run other tests working-directory: tests run: | - tests=("command-line-options" "data-rep" "i18n_sjis" "jp-compat" "run" "syntax" "cobj-idx" "file-lock" "misc") + tests=("command-line-options" "data-rep" "i18n_sjis" "jp-compat" "run" "syntax" "cobj-idx" "file-lock" "file-lock2" "misc") for test in "${tests[@]}"; do ./"$test" || true done diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index a05afe2a..ba45db81 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -55,6 +55,7 @@ jobs: - "cobj-idx" - "misc" - "file-lock" + - "file-lock2" os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] uses: ./.github/workflows/test-other.yml with: @@ -76,6 +77,7 @@ jobs: - "syntax" - "cobj-idx" - "file-lock" + - "file-lock2" #- "misc" os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] uses: ./.github/workflows/test-other.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 76682b73..888cc5dd 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -59,6 +59,7 @@ jobs: - "syntax" - "cobj-idx" - "file-lock" + - "file-lock2" - "misc" os: ["ubuntu:24.04"] uses: ./.github/workflows/test-other.yml @@ -80,7 +81,7 @@ jobs: - "run" - "syntax" - "cobj-idx" - - "file-lock" + - "file-lock2" #- "misc" os: ["ubuntu:24.04"] uses: ./.github/workflows/test-other.yml diff --git a/.gitignore b/.gitignore index cef26e9c..241a2495 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,7 @@ tests/cobj-idx tests/misc tests/run tests/file-lock +tests/file-lock2 tests/*.log tests/syntax tests/cobol85/*/*.class diff --git a/tests/Makefile.am b/tests/Makefile.am index b0d89750..a4e49598 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -31,6 +31,7 @@ TESTS = syntax \ command-line-options \ cobj-idx \ file-lock \ + file-lock2 \ misc else TESTS = syntax \ @@ -43,6 +44,7 @@ TESTS = syntax \ command-line-options \ cobj-idx \ file-lock \ + file-lock2 \ misc endif @@ -215,12 +217,14 @@ indexed_lock_DEPENDENCIES = \ file-lock.src/access-different-record.at \ file-lock.src/input-mode.at \ file-lock.src/same-process.at \ - file-lock.src/open-start-write-rewrite.at \ - file-lock.src/release-lock.at \ - file-lock.src/open-input.at \ - file-lock.src/lock-mode-clause.at \ - file-lock.src/old-file.at \ - file-lock.src/lock-mode-automatic.at + file-lock.src/open-start-write-rewrite.at + +indexed_lock2_DEPENDENCIES = \ + file-lock2.src/release-lock.at \ + file-lock2.src/open-input.at \ + file-lock2.src/lock-mode-clause.at \ + file-lock2.src/old-file.at \ + file-lock2.src/lock-mode-automatic.at misc_DEPENDENCIES = \ misc.src/signed-comp3.at \ @@ -308,4 +312,5 @@ $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES) $(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES) $(srcdir)/cobj-idx: $(cobj_idx_DEPENDENCIES) $(srcdir)/file-lock: $(indexed_lock_DEPENDENCIES) +$(srcdir)/file-lock2: $(indexed_lock2_DEPENDENCIES) $(srcdir)/misc: $(misc_DEPENDENCIES) diff --git a/tests/Makefile.in b/tests/Makefile.in index a6fe74f8..fa74b889 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -571,6 +571,7 @@ SUBDIRS = cobol85 @I18N_UTF8_FALSE@ command-line-options \ @I18N_UTF8_FALSE@ cobj-idx \ @I18N_UTF8_FALSE@ file-lock \ +@I18N_UTF8_FALSE@ file-lock2 \ @I18N_UTF8_FALSE@ misc @I18N_UTF8_TRUE@TESTS = syntax \ @@ -583,6 +584,7 @@ SUBDIRS = cobol85 @I18N_UTF8_TRUE@ command-line-options \ @I18N_UTF8_TRUE@ cobj-idx \ @I18N_UTF8_TRUE@ file-lock \ +@I18N_UTF8_TRUE@ file-lock2 \ @I18N_UTF8_TRUE@ misc syntax_DEPENDENCIES = \ @@ -754,12 +756,14 @@ indexed_lock_DEPENDENCIES = \ file-lock.src/access-different-record.at \ file-lock.src/input-mode.at \ file-lock.src/same-process.at \ - file-lock.src/open-start-write-rewrite.at \ - file-lock.src/release-lock.at \ - file-lock.src/open-input.at \ - file-lock.src/lock-mode-clause.at \ - file-lock.src/old-file.at \ - file-lock.src/lock-mode-automatic.at + file-lock.src/open-start-write-rewrite.at + +indexed_lock2_DEPENDENCIES = \ + file-lock2.src/release-lock.at \ + file-lock2.src/open-input.at \ + file-lock2.src/lock-mode-clause.at \ + file-lock2.src/old-file.at \ + file-lock2.src/lock-mode-automatic.at misc_DEPENDENCIES = \ misc.src/signed-comp3.at \ @@ -1168,6 +1172,13 @@ file-lock.log: file-lock --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +file-lock2.log: file-lock2 + @p='file-lock2'; \ + b='file-lock2'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) misc.log: misc @p='misc'; \ b='misc'; \ @@ -1410,6 +1421,7 @@ $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES) $(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES) $(srcdir)/cobj-idx: $(cobj_idx_DEPENDENCIES) $(srcdir)/file-lock: $(indexed_lock_DEPENDENCIES) +$(srcdir)/file-lock2: $(indexed_lock2_DEPENDENCIES) $(srcdir)/misc: $(misc_DEPENDENCIES) # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tests/file-lock.at b/tests/file-lock.at index 24985fce..3b85f861 100644 --- a/tests/file-lock.at +++ b/tests/file-lock.at @@ -6,8 +6,3 @@ m4_include([access-different-record.at]) m4_include([input-mode.at]) m4_include([same-process.at]) m4_include([open-start-write-rewrite.at]) -m4_include([release-lock.at]) -m4_include([open-input.at]) -m4_include([lock-mode-clause.at]) -m4_include([lock-mode-automatic.at]) -m4_include([old-file.at]) diff --git a/tests/file-lock2.at b/tests/file-lock2.at new file mode 100644 index 00000000..c6e7bd36 --- /dev/null +++ b/tests/file-lock2.at @@ -0,0 +1,7 @@ +AT_INIT([file-lock2]) + +m4_include([release-lock.at]) +m4_include([open-input.at]) +m4_include([lock-mode-clause.at]) +m4_include([lock-mode-automatic.at]) +m4_include([old-file.at]) \ No newline at end of file diff --git a/tests/file-lock.src/lock-mode-automatic.at b/tests/file-lock2.src/lock-mode-automatic.at similarity index 100% rename from tests/file-lock.src/lock-mode-automatic.at rename to tests/file-lock2.src/lock-mode-automatic.at diff --git a/tests/file-lock.src/lock-mode-clause.at b/tests/file-lock2.src/lock-mode-clause.at similarity index 100% rename from tests/file-lock.src/lock-mode-clause.at rename to tests/file-lock2.src/lock-mode-clause.at diff --git a/tests/file-lock.src/old-file.at b/tests/file-lock2.src/old-file.at similarity index 100% rename from tests/file-lock.src/old-file.at rename to tests/file-lock2.src/old-file.at diff --git a/tests/file-lock.src/open-input.at b/tests/file-lock2.src/open-input.at similarity index 100% rename from tests/file-lock.src/open-input.at rename to tests/file-lock2.src/open-input.at diff --git a/tests/file-lock.src/release-lock.at b/tests/file-lock2.src/release-lock.at similarity index 100% rename from tests/file-lock.src/release-lock.at rename to tests/file-lock2.src/release-lock.at From 04ca995dcb5ac7afb424bf77b801c088024fe4ae Mon Sep 17 00:00:00 2001 From: Yutaro Sakamoto Date: Mon, 15 Dec 2025 01:59:02 +0000 Subject: [PATCH 2/3] test: move some tests into file-lock2 --- tests/Makefile.am | 8 ++++---- tests/Makefile.in | 18 +++++++++--------- tests/file-lock.at | 5 +---- tests/file-lock2.at | 3 +++ .../input-mode.at | 0 .../open-start-write-rewrite.at | 0 .../same-process.at | 0 7 files changed, 17 insertions(+), 17 deletions(-) rename tests/{file-lock.src => file-lock2.src}/input-mode.at (100%) rename tests/{file-lock.src => file-lock2.src}/open-start-write-rewrite.at (100%) rename tests/{file-lock.src => file-lock2.src}/same-process.at (100%) diff --git a/tests/Makefile.am b/tests/Makefile.am index a4e49598..4b70cb5f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -214,12 +214,12 @@ indexed_lock_DEPENDENCIES = \ file-lock.at \ file-lock.src/lock-file.at \ file-lock.src/access-same-record.at \ - file-lock.src/access-different-record.at \ - file-lock.src/input-mode.at \ - file-lock.src/same-process.at \ - file-lock.src/open-start-write-rewrite.at + file-lock.src/access-different-record.at indexed_lock2_DEPENDENCIES = \ + file-lock2.src/input-mode.at + file-lock2.src/same-process.at \ + file-lock2.src/open-start-write-rewrite.at \ file-lock2.src/release-lock.at \ file-lock2.src/open-input.at \ file-lock2.src/lock-mode-clause.at \ diff --git a/tests/Makefile.in b/tests/Makefile.in index fa74b889..4dc8ccf8 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -753,17 +753,10 @@ indexed_lock_DEPENDENCIES = \ file-lock.at \ file-lock.src/lock-file.at \ file-lock.src/access-same-record.at \ - file-lock.src/access-different-record.at \ - file-lock.src/input-mode.at \ - file-lock.src/same-process.at \ - file-lock.src/open-start-write-rewrite.at + file-lock.src/access-different-record.at indexed_lock2_DEPENDENCIES = \ - file-lock2.src/release-lock.at \ - file-lock2.src/open-input.at \ - file-lock2.src/lock-mode-clause.at \ - file-lock2.src/old-file.at \ - file-lock2.src/lock-mode-automatic.at + file-lock2.src/input-mode.at misc_DEPENDENCIES = \ misc.src/signed-comp3.at \ @@ -1390,6 +1383,13 @@ uninstall-am: .PRECIOUS: Makefile + file-lock2.src/same-process.at \ + file-lock2.src/open-start-write-rewrite.at \ + file-lock2.src/release-lock.at \ + file-lock2.src/open-input.at \ + file-lock2.src/lock-mode-clause.at \ + file-lock2.src/old-file.at \ + file-lock2.src/lock-mode-automatic.at all: $(TESTS) diff --git a/tests/file-lock.at b/tests/file-lock.at index 3b85f861..d6a75ebc 100644 --- a/tests/file-lock.at +++ b/tests/file-lock.at @@ -2,7 +2,4 @@ AT_INIT([file-lock]) m4_include([lock-file.at]) m4_include([access-same-record.at]) -m4_include([access-different-record.at]) -m4_include([input-mode.at]) -m4_include([same-process.at]) -m4_include([open-start-write-rewrite.at]) +m4_include([access-different-record.at]) \ No newline at end of file diff --git a/tests/file-lock2.at b/tests/file-lock2.at index c6e7bd36..51faa076 100644 --- a/tests/file-lock2.at +++ b/tests/file-lock2.at @@ -1,5 +1,8 @@ AT_INIT([file-lock2]) +m4_include([input-mode.at]) +m4_include([same-process.at]) +m4_include([open-start-write-rewrite.at]) m4_include([release-lock.at]) m4_include([open-input.at]) m4_include([lock-mode-clause.at]) diff --git a/tests/file-lock.src/input-mode.at b/tests/file-lock2.src/input-mode.at similarity index 100% rename from tests/file-lock.src/input-mode.at rename to tests/file-lock2.src/input-mode.at diff --git a/tests/file-lock.src/open-start-write-rewrite.at b/tests/file-lock2.src/open-start-write-rewrite.at similarity index 100% rename from tests/file-lock.src/open-start-write-rewrite.at rename to tests/file-lock2.src/open-start-write-rewrite.at diff --git a/tests/file-lock.src/same-process.at b/tests/file-lock2.src/same-process.at similarity index 100% rename from tests/file-lock.src/same-process.at rename to tests/file-lock2.src/same-process.at From b18e412bf5cfbd9da4a9223a96c1c717e0a95fbe Mon Sep 17 00:00:00 2001 From: Yutaro Sakamoto Date: Mon, 15 Dec 2025 04:38:00 +0000 Subject: [PATCH 3/3] test: fix tests/Makefile.am --- tests/Makefile.am | 3 ++- tests/Makefile.in | 17 +++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 4b70cb5f..efca9074 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -217,7 +217,8 @@ indexed_lock_DEPENDENCIES = \ file-lock.src/access-different-record.at indexed_lock2_DEPENDENCIES = \ - file-lock2.src/input-mode.at + file-lock2.at \ + file-lock2.src/input-mode.at \ file-lock2.src/same-process.at \ file-lock2.src/open-start-write-rewrite.at \ file-lock2.src/release-lock.at \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 4dc8ccf8..828cbbee 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -756,7 +756,15 @@ indexed_lock_DEPENDENCIES = \ file-lock.src/access-different-record.at indexed_lock2_DEPENDENCIES = \ - file-lock2.src/input-mode.at + file-lock2.at \ + file-lock2.src/input-mode.at \ + file-lock2.src/same-process.at \ + file-lock2.src/open-start-write-rewrite.at \ + file-lock2.src/release-lock.at \ + file-lock2.src/open-input.at \ + file-lock2.src/lock-mode-clause.at \ + file-lock2.src/old-file.at \ + file-lock2.src/lock-mode-automatic.at misc_DEPENDENCIES = \ misc.src/signed-comp3.at \ @@ -1383,13 +1391,6 @@ uninstall-am: .PRECIOUS: Makefile - file-lock2.src/same-process.at \ - file-lock2.src/open-start-write-rewrite.at \ - file-lock2.src/release-lock.at \ - file-lock2.src/open-input.at \ - file-lock2.src/lock-mode-clause.at \ - file-lock2.src/old-file.at \ - file-lock2.src/lock-mode-automatic.at all: $(TESTS)