Skip to content

Commit cce5717

Browse files
authored
Merge pull request dosemu2#2644 from andrewbird/ci-220
CI: packaging workflow renaming and other tidyups and fixes
2 parents 19278b6 + d52d2d0 commit cce5717

File tree

4 files changed

+22
-19
lines changed

4 files changed

+22
-19
lines changed

.github/workflows/ci-flatpak.yml renamed to .github/workflows/create-packages-flatpak.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
# branches:
55
# - devel
66

7-
name: Flatpack build
7+
name: Create Packages (Flatpak)
88

99
jobs:
1010
build:
11-
name: "Flatpak"
11+
name: "build"
1212
runs-on: ubuntu-24.04
1313
if: (github.repository_owner == 'dosemu2')
1414
container:

.github/workflows/packages.yml renamed to .github/workflows/create-packages-termux.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Packages
1+
name: Create Packages (Termux)
22

33
on:
44
push:
@@ -16,6 +16,7 @@ permissions: {} # none
1616

1717
jobs:
1818
build:
19+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
1920
permissions:
2021
contents: read # actions/upload-artifact doesn't need contents: write
2122
runs-on: ubuntu-24.04

ci_test.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ python3 test/test_dosemu.py --get-test-binaries
2222
# Make cpu tests here so that we see any failures
2323
make -C test/cpu clean all
2424

25-
echo
26-
echo "====================================================="
27-
echo "= Tests run on various flavours of DOS ="
28-
echo "====================================================="
25+
cat >&2 << EOF
26+
=====================================================
27+
= Tests run on various flavours of DOS =
28+
=====================================================
29+
EOF
2930
# all DOS flavours, all tests
3031
# python3 test/test_dosemu.py
3132
# single DOS example
@@ -72,15 +73,15 @@ if [ "${BLDTYPE}" != "packaged" ] ; then # Only makes sense if we are building
7273
}
7374

7475
branch_has_emulator_changes() {
75-
git diff --name-only ${BASE_SHA:-}..HEAD -- src/base/emu-i386/simx8
76+
[ "$(git diff --name-only ${BASE_SHA:-}..HEAD -- src/base/emu-i386/simx86 | wc -l)" != "0" ]
7677
}
7778

7879
last5_has_emulator_changes() {
79-
git diff --name-only HEAD~5 -- src/base/emu-i386/simx86
80+
[ "$(git diff --name-only HEAD~5 -- src/base/emu-i386/simx86 | wc -l)" != "0" ]
8081
}
8182

8283
merge_has_emulator_changes() {
83-
git diff --name-only HEAD ^HEAD^1 -- src/base/emu-i386/simx8
84+
[ "$(git diff --name-only HEAD ^HEAD^1 -- src/base/emu-i386/simx86 | wc -l)" != "0" ]
8485
}
8586

8687
if is_primary ; then

test/common_framework.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,18 @@ def setUpClassPost(cls):
183183
major, minor = release().split('.')[0:2]
184184
if not (major == '6' and minor in ['11', '12', '13']):
185185
if environ.get("NO_KVM", '0') == '1':
186-
print("\nUsable KVM found but NO_KVM=1 - Disabling\n")
186+
print(" \nUsable KVM found but NO_KVM=1 - Disabling", file=stderr, flush=True)
187187
else:
188-
print("\nUsable KVM found\n")
188+
print(" \nUsable KVM found", file=stderr, flush=True)
189189
cls.have_kvm = True
190190
else:
191-
print("\nUsable KVM found but blacklisted kernel (6.11 - 6.13) - Disabling\n")
191+
print(" \nUsable KVM found but blacklisted kernel (6.11 - 6.13) - Disabling", file=stderr, flush=True)
192192

193193
except FileNotFoundError:
194194
pass
195195
except PermissionError:
196196
op = check_output(["getfacl", "/dev/kvm"])
197-
print("\nPermissions wrong on /dev/kvm\n%s\n" % op.decode('ASCII'))
197+
print(" \nPermissions wrong on /dev/kvm\n%s" % op.decode('ASCII'), file=stderr, flush=True)
198198

199199
@classmethod
200200
def tearDownClass(cls):
@@ -587,11 +587,6 @@ def test_0_basic_boot(self):
587587

588588
class MyTestResult(unittest.TextTestResult):
589589

590-
def startTestRun(self):
591-
super(MyTestResult, self).startTestRun()
592-
self.stream.writeln(" ")
593-
self.stream.flush()
594-
595590
def getDescription(self, test):
596591
if 'SubTest' in strclass(test.__class__):
597592
return str(test)
@@ -724,6 +719,12 @@ def addSubTest(self, test, subtest, err):
724719
class MyTestRunner(unittest.TextTestRunner):
725720
resultclass = MyTestResult
726721

722+
def run(self, test):
723+
self.stream.flush()
724+
result = super().run(test)
725+
self.stream.flush()
726+
return result
727+
727728

728729
def main(argv=None):
729730
if version_info < (3, 2):

0 commit comments

Comments
 (0)