diff --git a/Tests/DeterminismDifferentialTests.swift b/Tests/DeterminismDifferentialTests.swift index 2d6c1f9..3d51c1b 100644 --- a/Tests/DeterminismDifferentialTests.swift +++ b/Tests/DeterminismDifferentialTests.swift @@ -87,7 +87,8 @@ struct DeterminismDifferentialTests { @Test("PureXML's UPA verdict agrees with libxml2 over generated content models") func test_determinismDifferential() { guard enabled, let xmllint else { return } - var generator = DeterminismSchemaGenerator(seed: 0xDE7E_5A11_C0DE_F00D) + let seed = ProcessInfo.processInfo.environment["DIFF_SEED"].flatMap { UInt64($0) } ?? 0xDE7E_5A11_C0DE_F00D + var generator = DeterminismSchemaGenerator(seed: seed) var falsePositives: [String] = [] var falseNegatives: [String] = [] var compared = 0 diff --git a/Tests/FacetValidationDifferentialTests.swift b/Tests/FacetValidationDifferentialTests.swift index bcedfdd..a52cef7 100644 --- a/Tests/FacetValidationDifferentialTests.swift +++ b/Tests/FacetValidationDifferentialTests.swift @@ -114,7 +114,8 @@ struct FacetValidationDifferentialTests { @Test("PureXML's facet-validity verdict agrees with libxml2 over generated values") func test_facetDifferential() { guard enabled, let xmllint else { return } - var generator = FacetSchemaGenerator(seed: 0xFACE_7D1F_F00D_C0DE) + let seed = ProcessInfo.processInfo.environment["DIFF_SEED"].flatMap { UInt64($0) } ?? 0xFACE_7D1F_F00D_C0DE + var generator = FacetSchemaGenerator(seed: seed) var tally = Tally() let schemaFile = NSTemporaryDirectory() + "facet-diff-schema.xsd" for _ in 0 ..< 2000 { diff --git a/Tests/InstanceValidationDifferentialTests.swift b/Tests/InstanceValidationDifferentialTests.swift index fe543fb..dee8c6f 100644 --- a/Tests/InstanceValidationDifferentialTests.swift +++ b/Tests/InstanceValidationDifferentialTests.swift @@ -107,7 +107,8 @@ struct InstanceValidationDifferentialTests { @Test("PureXML's instance-validity verdict agrees with libxml2 over generated documents") func test_instanceDifferential() { guard enabled, let xmllint else { return } - var generator = InstanceSchemaGenerator(seed: 0x1A57_C0DE_5EED_BEEF) + let seed = ProcessInfo.processInfo.environment["DIFF_SEED"].flatMap { UInt64($0) } ?? 0x1A57_C0DE_5EED_BEEF + var generator = InstanceSchemaGenerator(seed: seed) var tally = Tally() let schemaFile = NSTemporaryDirectory() + "inst-diff-schema.xsd" for _ in 0 ..< 1500 {