-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Huge refactor to resolve cyclic dependency + get jcstress to work
- Loading branch information
1 parent
586f237
commit 9798a48
Showing
49 changed files
with
193 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ build/ | |
temp/ | ||
*.hprof | ||
gitignored/ | ||
local.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
plugins { | ||
kotlin("multiplatform") | ||
} | ||
|
||
kotlin { | ||
val nativeTargets = listOf( | ||
linuxX64(), | ||
// linuxArm64(), // 1) no machine currently available 2) CLI library does not support | ||
macosX64(), | ||
macosArm64(), | ||
) | ||
nativeTargets.forEach { target -> | ||
target.binaries { | ||
executable { | ||
entryPoint = "main" | ||
} | ||
} | ||
} | ||
jvm { | ||
withJava() | ||
} | ||
|
||
sourceSets { | ||
commonMain { | ||
dependencies { | ||
implementation(project(":core")) | ||
implementation("com.github.ajalt.clikt:clikt:4.2.1") | ||
} | ||
} | ||
jvmMain { | ||
dependencies { | ||
implementation(project(":jcstress-wrapper")) | ||
} | ||
} | ||
} | ||
} | ||
|
||
val jcsDir: File get() = File(System.getenv("JCS_DIR") ?: error("JCS_DIR envvar is not set")) | ||
|
||
//tasks.named("jvmRun") { | ||
// dependsOn(":core:copyLibToJCStress") | ||
// dependsOn(":jcstress-wrapper:copyLibToJCStress") | ||
//} | ||
|
||
// code above does not sync | ||
tasks.whenTaskAdded { | ||
if (name == "jvmRun") { | ||
dependsOn(":core:copyLibToJCStress") | ||
dependsOn(":jcstress-wrapper:run") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
plugins { | ||
kotlin("jvm") | ||
application | ||
} | ||
|
||
application { | ||
mainClass = "MainKt" | ||
} | ||
|
||
dependencies { | ||
implementation(project(":core")) | ||
implementation(kotlin("reflect")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import komem.litmus.generateWrapperFile | ||
import komem.litmus.generated.LitmusTestRegistry | ||
import kotlin.io.path.Path | ||
|
||
fun main() { | ||
var successCnt = 0 | ||
val allTests = LitmusTestRegistry.all() | ||
for (test in allTests) { | ||
val success = generateWrapperFile(test, jcstressDirectory) | ||
if (success) successCnt++ | ||
} | ||
if (successCnt != allTests.size) { | ||
System.err.println("WARNING: generated wrappers for $successCnt out of ${allTests.size} known tests") | ||
} | ||
} | ||
|
||
val jcstressDirectory | ||
get() = Path(System.getenv("JCS_DIR") ?: error("JCS_DIR envvar is not set")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.