Skip to content

Commit

Permalink
Factorial sample program is no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach committed Jun 20, 2024
1 parent 1bae374 commit 562e611
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 32 deletions.
14 changes: 0 additions & 14 deletions build/build/src/engine/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,20 +635,6 @@ pub async fn runner_sanity_test(
let engine_package = repo_root.built_distribution.enso_engine_triple.engine_package.as_path();
// The engine package is necessary for running the native runner.
ide_ci::fs::tokio::require_exist(engine_package).await?;
let output = Command::new(&repo_root.runner)
.args([
"--run",
repo_root.engine.runner.src.test.resources.factorial_enso.as_str(),
factorial_input,
])
.set_env_opt(ENSO_JAVA, enso_java)?
.set_env(ENSO_DATA_DIRECTORY, engine_package)?
.run_stdout()
.await?;
ensure!(
output.contains(factorial_expected_output),
"Native runner output does not contain expected result '{factorial_expected_output}'. Output:\n{output}",
);
if enso_java.is_none() {
let test_base = Command::new(&repo_root.runner)
.args(["--run", repo_root.test.join("Base_Tests").as_str()])
Expand Down
11 changes: 5 additions & 6 deletions docs/infrastructure/native-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,16 @@ state. To generate the Native Image for runner simply execute
sbt> engine-runner/buildNativeImage
```

and execute the binary on a sample factorial test program
and execute any program with that binary - for example `test/Base_Tests`

```bash
> runner --run engine/runner/src/test/resources/Factorial.enso 6
$ runner --run test/Base_Tests
```

The task that generates the Native Image, along with all the necessary
configuration, reside in a separate project due to a bug in the currently used
GraalVM version. As September 2023 it can execute all Enso code, but cannot
invoke `IO.println` or other library functions that require
[polyglot java import](../../docs/polyglot/java.md), but read on...
configuration, makes sure that `Standard.Base` library calls into Java via
[polyglot java import](../../docs/polyglot/java.md) are compiled into the binary
and ready to be used.

### Engine with Espresso

Expand Down
12 changes: 0 additions & 12 deletions engine/runner/src/test/resources/Factorial.enso

This file was deleted.

0 comments on commit 562e611

Please sign in to comment.