Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/sources/test
diff options
context:
space:
mode:
authorLeitwolf112026-11-13 01:54:38 +0300
committerLeitwolf112026-11-13 01:54:38 +0300
commit34acd40e7c520dda4addfc63ed3e26175fb399c5 (patch)
treea69fa983f7fa35603d3667ea99bb2c011043cf6c /sources/test
parentd73260a011d463f492448bc2e29aa46fba657326 (diff)
downloadtazel-feature/action-level-incremental.tar.gz
Make Windows objects reproducible so early cutoff holds therefeature/action-level-incremental
The Windows runner showed that a comment in a header recompiled both units and then archived and relinked, where Linux and macOS stopped after the compiles. Clang stamps objects for Windows targets with the time by default, and debug information there records the content of every header, so the objects always differed. - Clang gets -mno-incremental-linker-compatible for Windows targets: the same source gives the same object. - The early-cutoff part of BuildCommandTest builds in release mode, without debug information, on every system.
Diffstat (limited to 'sources/test')
-rw-r--r--sources/test/kotlin/com/progmasoft/tazel/cli/BuildCommandTest.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/sources/test/kotlin/com/progmasoft/tazel/cli/BuildCommandTest.kt b/sources/test/kotlin/com/progmasoft/tazel/cli/BuildCommandTest.kt
index fa5d0d5..3082df3 100644
--- a/sources/test/kotlin/com/progmasoft/tazel/cli/BuildCommandTest.kt
+++ b/sources/test/kotlin/com/progmasoft/tazel/cli/BuildCommandTest.kt
@@ -136,9 +136,12 @@ class BuildCommandTest {
)
// A comment recompiles both units that include the header; their objects come out the same,
- // so neither the archive nor the program is made again.
+ // so neither the archive nor the program is made again. Release builds carry no debug
+ // information, which on some systems records the content of every header.
+ val (release, releaseOutput) = tazel(root, ".", processes, "build", "--release", "//...")
+ assertEquals(ExitCode.SUCCESS, release, releaseOutput.stderr())
Files.writeString(header, "int sample_add(int a, int b); /* changed */\n")
- val (comment, commentOutput) = tazel(root, ".", processes, "build", "//...")
+ val (comment, commentOutput) = tazel(root, ".", processes, "build", "--release", "//...")
assertEquals(ExitCode.SUCCESS, comment, commentOutput.stderr())
assertContains(commentOutput.stdout(), "2 command(s) run")