Skip to content

Commit ed0193c

Browse files
Split file lock tests (#771)
* test: split test cases * test: move some tests into file-lock2 * test: fix tests/Makefile.am
1 parent 74e728e commit ed0193c

16 files changed

Lines changed: 54 additions & 29 deletions

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Run other tests
4242
working-directory: tests
4343
run: |
44-
tests=("command-line-options" "data-rep" "i18n_sjis" "jp-compat" "run" "syntax" "cobj-idx" "file-lock" "misc")
44+
tests=("command-line-options" "data-rep" "i18n_sjis" "jp-compat" "run" "syntax" "cobj-idx" "file-lock" "file-lock2" "misc")
4545
for test in "${tests[@]}"; do
4646
./"$test" || true
4747
done

.github/workflows/pull-request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
- "cobj-idx"
5656
- "misc"
5757
- "file-lock"
58+
- "file-lock2"
5859
os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"]
5960
uses: ./.github/workflows/test-other.yml
6061
with:
@@ -76,6 +77,7 @@ jobs:
7677
- "syntax"
7778
- "cobj-idx"
7879
- "file-lock"
80+
- "file-lock2"
7981
#- "misc"
8082
os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"]
8183
uses: ./.github/workflows/test-other.yml

.github/workflows/push.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
- "syntax"
6060
- "cobj-idx"
6161
- "file-lock"
62+
- "file-lock2"
6263
- "misc"
6364
os: ["ubuntu:24.04"]
6465
uses: ./.github/workflows/test-other.yml
@@ -80,7 +81,7 @@ jobs:
8081
- "run"
8182
- "syntax"
8283
- "cobj-idx"
83-
- "file-lock"
84+
- "file-lock2"
8485
#- "misc"
8586
os: ["ubuntu:24.04"]
8687
uses: ./.github/workflows/test-other.yml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ tests/cobj-idx
5555
tests/misc
5656
tests/run
5757
tests/file-lock
58+
tests/file-lock2
5859
tests/*.log
5960
tests/syntax
6061
tests/cobol85/*/*.class

tests/Makefile.am

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ TESTS = syntax \
3131
command-line-options \
3232
cobj-idx \
3333
file-lock \
34+
file-lock2 \
3435
misc
3536
else
3637
TESTS = syntax \
@@ -43,6 +44,7 @@ TESTS = syntax \
4344
command-line-options \
4445
cobj-idx \
4546
file-lock \
47+
file-lock2 \
4648
misc
4749
endif
4850

@@ -212,15 +214,18 @@ indexed_lock_DEPENDENCIES = \
212214
file-lock.at \
213215
file-lock.src/lock-file.at \
214216
file-lock.src/access-same-record.at \
215-
file-lock.src/access-different-record.at \
216-
file-lock.src/input-mode.at \
217-
file-lock.src/same-process.at \
218-
file-lock.src/open-start-write-rewrite.at \
219-
file-lock.src/release-lock.at \
220-
file-lock.src/open-input.at \
221-
file-lock.src/lock-mode-clause.at \
222-
file-lock.src/old-file.at \
223-
file-lock.src/lock-mode-automatic.at
217+
file-lock.src/access-different-record.at
218+
219+
indexed_lock2_DEPENDENCIES = \
220+
file-lock2.at \
221+
file-lock2.src/input-mode.at \
222+
file-lock2.src/same-process.at \
223+
file-lock2.src/open-start-write-rewrite.at \
224+
file-lock2.src/release-lock.at \
225+
file-lock2.src/open-input.at \
226+
file-lock2.src/lock-mode-clause.at \
227+
file-lock2.src/old-file.at \
228+
file-lock2.src/lock-mode-automatic.at
224229

225230
misc_DEPENDENCIES = \
226231
misc.src/signed-comp3.at \
@@ -308,4 +313,5 @@ $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES)
308313
$(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES)
309314
$(srcdir)/cobj-idx: $(cobj_idx_DEPENDENCIES)
310315
$(srcdir)/file-lock: $(indexed_lock_DEPENDENCIES)
316+
$(srcdir)/file-lock2: $(indexed_lock2_DEPENDENCIES)
311317
$(srcdir)/misc: $(misc_DEPENDENCIES)

tests/Makefile.in

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ SUBDIRS = cobol85
571571
@I18N_UTF8_FALSE@ command-line-options \
572572
@I18N_UTF8_FALSE@ cobj-idx \
573573
@I18N_UTF8_FALSE@ file-lock \
574+
@I18N_UTF8_FALSE@ file-lock2 \
574575
@I18N_UTF8_FALSE@ misc
575576

576577
@I18N_UTF8_TRUE@TESTS = syntax \
@@ -583,6 +584,7 @@ SUBDIRS = cobol85
583584
@I18N_UTF8_TRUE@ command-line-options \
584585
@I18N_UTF8_TRUE@ cobj-idx \
585586
@I18N_UTF8_TRUE@ file-lock \
587+
@I18N_UTF8_TRUE@ file-lock2 \
586588
@I18N_UTF8_TRUE@ misc
587589

588590
syntax_DEPENDENCIES = \
@@ -751,15 +753,18 @@ indexed_lock_DEPENDENCIES = \
751753
file-lock.at \
752754
file-lock.src/lock-file.at \
753755
file-lock.src/access-same-record.at \
754-
file-lock.src/access-different-record.at \
755-
file-lock.src/input-mode.at \
756-
file-lock.src/same-process.at \
757-
file-lock.src/open-start-write-rewrite.at \
758-
file-lock.src/release-lock.at \
759-
file-lock.src/open-input.at \
760-
file-lock.src/lock-mode-clause.at \
761-
file-lock.src/old-file.at \
762-
file-lock.src/lock-mode-automatic.at
756+
file-lock.src/access-different-record.at
757+
758+
indexed_lock2_DEPENDENCIES = \
759+
file-lock2.at \
760+
file-lock2.src/input-mode.at \
761+
file-lock2.src/same-process.at \
762+
file-lock2.src/open-start-write-rewrite.at \
763+
file-lock2.src/release-lock.at \
764+
file-lock2.src/open-input.at \
765+
file-lock2.src/lock-mode-clause.at \
766+
file-lock2.src/old-file.at \
767+
file-lock2.src/lock-mode-automatic.at
763768

764769
misc_DEPENDENCIES = \
765770
misc.src/signed-comp3.at \
@@ -1168,6 +1173,13 @@ file-lock.log: file-lock
11681173
--log-file $$b.log --trs-file $$b.trs \
11691174
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
11701175
"$$tst" $(AM_TESTS_FD_REDIRECT)
1176+
file-lock2.log: file-lock2
1177+
@p='file-lock2'; \
1178+
b='file-lock2'; \
1179+
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1180+
--log-file $$b.log --trs-file $$b.trs \
1181+
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1182+
"$$tst" $(AM_TESTS_FD_REDIRECT)
11711183
misc.log: misc
11721184
@p='misc'; \
11731185
b='misc'; \
@@ -1410,6 +1422,7 @@ $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES)
14101422
$(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES)
14111423
$(srcdir)/cobj-idx: $(cobj_idx_DEPENDENCIES)
14121424
$(srcdir)/file-lock: $(indexed_lock_DEPENDENCIES)
1425+
$(srcdir)/file-lock2: $(indexed_lock2_DEPENDENCIES)
14131426
$(srcdir)/misc: $(misc_DEPENDENCIES)
14141427

14151428
# Tell versions [3.59,3.63) of GNU make to not export all variables.

tests/file-lock.at

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,4 @@ AT_INIT([file-lock])
22

33
m4_include([lock-file.at])
44
m4_include([access-same-record.at])
5-
m4_include([access-different-record.at])
6-
m4_include([input-mode.at])
7-
m4_include([same-process.at])
8-
m4_include([open-start-write-rewrite.at])
9-
m4_include([release-lock.at])
10-
m4_include([open-input.at])
11-
m4_include([lock-mode-clause.at])
12-
m4_include([lock-mode-automatic.at])
13-
m4_include([old-file.at])
5+
m4_include([access-different-record.at])

tests/file-lock2.at

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
AT_INIT([file-lock2])
2+
3+
m4_include([input-mode.at])
4+
m4_include([same-process.at])
5+
m4_include([open-start-write-rewrite.at])
6+
m4_include([release-lock.at])
7+
m4_include([open-input.at])
8+
m4_include([lock-mode-clause.at])
9+
m4_include([lock-mode-automatic.at])
10+
m4_include([old-file.at])
File renamed without changes.

0 commit comments

Comments
 (0)