Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/cross-spark-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ jobs:
- name: Verify sbt Maven local opt-in
run: python3 project/tests/test_sbt_resolvers.py

- name: Verify dev/run-tests.py
run: python3 project/tests/test_run_tests.py

- name: Run cross-Spark build test
run: python3 project/tests/test_cross_spark_publish.py
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Unity Catalog is a JVM project, and mostly Java: the server, the Java client, th
```bash
build/sbt clean compile # compile everything, no tests
build/sbt clean package publishLocal # build and publish artifacts locally
build/sbt -J-Xmx2G clean test # full test suite (give it heap)
dev/run-tests.py # full test suite, preferred: same tests as `build/sbt test`, in parallel JVMs sized to the CPUs and memory (see --help)
build/sbt -J-Xmx2G clean test # full test suite, serially: for a weak machine, where the script picks only 1-2 JVMs (-J-Xmx is sbt's own heap, needed for serverShaded/assembly; forked test JVMs are unaffected)
build/sbt "server/test" # one module's tests
build/sbt "server/testOnly io.unitycatalog.server.service.PermissionServiceTest" # one class (fast loop)
build/sbt -J-Xmx2G jacoco # coverage report
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,12 @@ Refer to [sbt docs](https://www.scala-sbt.org/1.x/docs/) for more commands.
```sh
build/sbt clean compile
```
- To compile and execute tests, run the following:
- To compile and execute tests, run the following. It runs the same tests as `build/sbt test`, split
across parallel JVMs sized to the machine's CPUs and memory (see `dev/run-tests.py --help`):
```sh
dev/run-tests.py
```
On a weak machine, where the script picks only 1-2 JVMs, run the tests serially instead:
```sh
build/sbt -J-Xmx2G clean test
```
Expand Down
8 changes: 6 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ lazy val commonSettings = Seq(
},

assembly / test := {}
)
) ++ TestParallelization.settings

lazy val log4jProcessSettings = Seq(
libraryDependencies ++= Seq(
Expand Down Expand Up @@ -921,9 +921,13 @@ lazy val root = (project in file("."))
name := s"$artifactNamePrefix",
createTarballSettings(),
commonSettings,
rootReleaseSettings
rootReleaseSettings,
// dev/run-tests.py keeps its log and suite durations here, also across a `clean` in the run.
cleanKeepFiles ++= Seq(target.value / "test-logs", target.value / "test-durations.csv"),
)

TestParallelization.globalSettings

def generateClasspathFile(targetDir: File, classpath: Classpath): Unit = {
// Generate a classpath file with the entire runtime class path.
// This is used by the launcher scripts for launching CLI directly with JAR instead of SBT.
Expand Down
Loading
Loading