From 3849595ddc9423f790e82623fa6a0fd1c5e86959 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 16 Dec 2024 12:41:17 +0300 Subject: [PATCH 01/11] #429: stack and heap for test command --- mvnw/pom.xml | 12 ++++++++++++ src/commands/java/test.js | 8 +++++++- src/eoc.js | 6 ++++-- test/commands/test_test.js | 2 ++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/mvnw/pom.xml b/mvnw/pom.xml index 024cf19..b6fb185 100644 --- a/mvnw/pom.xml +++ b/mvnw/pom.xml @@ -30,6 +30,8 @@ SOFTWARE. UTF-8 undefined 0.6.22 + 256M + 64M @@ -101,6 +103,16 @@ SOFTWARE. true false false + random + -Xmx${heap-size} -Xss${stack-size} + + + + junit.jupiter.execution.parallel.enabled = true + junit.jupiter.execution.parallel.mode.default = concurrent + junit.jupiter.execution.parallel.mode.classes.default = concurrent + + diff --git a/src/commands/java/test.js b/src/commands/java/test.js index 1eaeba7..06a77ce 100644 --- a/src/commands/java/test.js +++ b/src/commands/java/test.js @@ -30,5 +30,11 @@ const {mvnw, flags} = require('../../mvnw'); * @return {Promise} of compile task */ module.exports = function(opts) { - return mvnw(['surefire:test'].concat(flags(opts))); + return mvnw( + [ + 'surefire:test' + `-Xss${opts.stack}`, + `-Xms${opts.heap}`, + ].concat(flags(opts)) + ); }; diff --git a/src/eoc.js b/src/eoc.js index 031b9e6..4aad75f 100755 --- a/src/eoc.js +++ b/src/eoc.js @@ -310,7 +310,7 @@ program.command('link') program.command('dataize') .description('Run the single executable binary and dataize an object') - .option('--stack ', 'Set stack size for the virtual machine', '1M') + .option('--stack ', 'Set stack size for the virtual machine', '64M') .option('--heap ', 'Set the heap size for the VM', '256M') .action((str, opts) => { clear(str); @@ -333,6 +333,8 @@ program.command('dataize') program.command('test') .description('Run all visible unit tests') + .option('--stack ', 'Set stack size for the virtual machine', '64M') + .option('--heap ', 'Set the heap size for the VM', '256M') .action((str, opts) => { clear(str); if (program.opts().alone == undefined) { @@ -344,7 +346,7 @@ program.command('test') .then((r) => coms().link(program.opts())) .then((r) => coms().test(program.opts())); } else { - coms().test(program.opts()); + coms().test({...program.opts(), ...str}); } }); diff --git a/test/commands/test_test.js b/test/commands/test_test.js index 0a111b4..92d4184 100644 --- a/test/commands/test_test.js +++ b/test/commands/test_test.js @@ -60,6 +60,8 @@ describe('test', function() { '--easy', `--parser=${parser}`, `--home-tag=${hash}`, + '--stack=16M', + '--heap=128M', '-s', path.resolve(home, 'src'), '-t', path.resolve(home, 'target'), `--language=${lang}` From 9f7679f3a21619a497d242e2ecdb8a084e066791 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 16 Dec 2024 12:49:54 +0300 Subject: [PATCH 02/11] #429: typo --- eo-version.txt | 2 +- home-tag.txt | 2 +- src/commands/java/test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eo-version.txt b/eo-version.txt index e85205d..5c4503b 100644 --- a/eo-version.txt +++ b/eo-version.txt @@ -1 +1 @@ -0.48.2 +0.49.0 diff --git a/home-tag.txt b/home-tag.txt index e85205d..5c4503b 100644 --- a/home-tag.txt +++ b/home-tag.txt @@ -1 +1 @@ -0.48.2 +0.49.0 diff --git a/src/commands/java/test.js b/src/commands/java/test.js index 06a77ce..5373008 100644 --- a/src/commands/java/test.js +++ b/src/commands/java/test.js @@ -32,7 +32,7 @@ const {mvnw, flags} = require('../../mvnw'); module.exports = function(opts) { return mvnw( [ - 'surefire:test' + 'surefire:test', `-Xss${opts.stack}`, `-Xms${opts.heap}`, ].concat(flags(opts)) From ece2a53529ea54b03fc882cce393fb8c1bd9295f Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 16 Dec 2024 12:51:02 +0300 Subject: [PATCH 03/11] #429: pass right --- src/commands/java/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/java/test.js b/src/commands/java/test.js index 5373008..f6373f9 100644 --- a/src/commands/java/test.js +++ b/src/commands/java/test.js @@ -33,8 +33,8 @@ module.exports = function(opts) { return mvnw( [ 'surefire:test', - `-Xss${opts.stack}`, - `-Xms${opts.heap}`, + `-Dstack-size=${opts.stack}`, + `-Dheap-size=${opts.heap}`, ].concat(flags(opts)) ); }; From 4f44b2e24e9807f8309057d5127eca221eabc37e Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 16 Dec 2024 17:26:28 +0300 Subject: [PATCH 04/11] #429: up --- eo-version.txt | 2 +- mvnw/pom.xml | 8 -------- test/commands/test_test.js | 4 ++-- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/eo-version.txt b/eo-version.txt index 5c4503b..36328c4 100644 --- a/eo-version.txt +++ b/eo-version.txt @@ -1 +1 @@ -0.49.0 +0.49.1 diff --git a/mvnw/pom.xml b/mvnw/pom.xml index b6fb185..41c37db 100644 --- a/mvnw/pom.xml +++ b/mvnw/pom.xml @@ -105,14 +105,6 @@ SOFTWARE. false random -Xmx${heap-size} -Xss${stack-size} - - - - junit.jupiter.execution.parallel.enabled = true - junit.jupiter.execution.parallel.mode.default = concurrent - junit.jupiter.execution.parallel.mode.classes.default = concurrent - - diff --git a/test/commands/test_test.js b/test/commands/test_test.js index 92d4184..87a84b6 100644 --- a/test/commands/test_test.js +++ b/test/commands/test_test.js @@ -60,8 +60,8 @@ describe('test', function() { '--easy', `--parser=${parser}`, `--home-tag=${hash}`, - '--stack=16M', - '--heap=128M', + '--stack=64M', + '--heap=1G', '-s', path.resolve(home, 'src'), '-t', path.resolve(home, 'target'), `--language=${lang}` From 66d9ecd8d2297a199100c33840a519c1940244b5 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 16 Dec 2024 17:34:55 +0300 Subject: [PATCH 05/11] #429: typo fixed --- src/eoc.js | 2 +- test/commands/test_test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/eoc.js b/src/eoc.js index 4aad75f..f67b7a2 100755 --- a/src/eoc.js +++ b/src/eoc.js @@ -344,7 +344,7 @@ program.command('test') .then((r) => coms().transpile(program.opts())) .then((r) => coms().compile(program.opts())) .then((r) => coms().link(program.opts())) - .then((r) => coms().test(program.opts())); + .then((r) => coms().test({...program.opts(), ...str})); } else { coms().test({...program.opts(), ...str}); } diff --git a/test/commands/test_test.js b/test/commands/test_test.js index 87a84b6..92d4184 100644 --- a/test/commands/test_test.js +++ b/test/commands/test_test.js @@ -60,8 +60,8 @@ describe('test', function() { '--easy', `--parser=${parser}`, `--home-tag=${hash}`, - '--stack=64M', - '--heap=1G', + '--stack=16M', + '--heap=128M', '-s', path.resolve(home, 'src'), '-t', path.resolve(home, 'target'), `--language=${lang}` From a71928711ac23cab577cfa6da8cb6ba469bf79d9 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 16 Dec 2024 17:42:27 +0300 Subject: [PATCH 06/11] #429: home up --- .github/workflows/itest.yml | 16 ++++++++++------ home-tag.txt | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/itest.yml b/.github/workflows/itest.yml index 3a6c79b..a0fc421 100644 --- a/.github/workflows/itest.yml +++ b/.github/workflows/itest.yml @@ -40,8 +40,6 @@ jobs: node: [ 16 ] # lang: [Java, JavaScript] lang: [ Java ] - parser: [ 0.48.2 ] - tag: [ 0.48.2 ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -55,7 +53,13 @@ jobs: - run: npm install - run: | cd itest - node ../src/eoc.js "--parser=${{ matrix.parser }}" "--home-tag=${{ matrix.tag }}" --batch "--language=${{ matrix.lang }}" --easy dataize program - node ../src/eoc.js "--parser=${{ matrix.parser }}" "--home-tag=${{ matrix.tag }}" --batch --alone "--language=${{ matrix.lang }}" --easy dataize program - node ../src/eoc.js clean - node ../src/eoc.js "--parser=${{ matrix.parser }}" "--home-tag=${{ matrix.tag }}" --batch "--language=${{ matrix.lang }}" --easy test + opts=( + "../src/eoc.js" + "--batch" + "--language=${{ matrix.lang }}" + "--easy" + ) + node "${opts[@]}" link + node "${opts[@]}" --alone dataize program + node "${opts[@]}" clean + node "${opts[@]}" test diff --git a/home-tag.txt b/home-tag.txt index 5c4503b..36328c4 100644 --- a/home-tag.txt +++ b/home-tag.txt @@ -1 +1 @@ -0.49.0 +0.49.1 From 83563a587cc5daf4c3ace5236f7e1e027b5e578e Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 16 Dec 2024 17:44:26 +0300 Subject: [PATCH 07/11] #429: rename --- .github/workflows/itest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/itest.yml b/.github/workflows/itest.yml index a0fc421..f4f8778 100644 --- a/.github/workflows/itest.yml +++ b/.github/workflows/itest.yml @@ -32,7 +32,7 @@ concurrency: group: itest-${{ github.ref }} cancel-in-progress: true jobs: - build: + itest: strategy: matrix: os: [ ubuntu-24.04, macos-15, windows-2022 ] From db0afa943dda77797b7773c7e3be7186635dd0f5 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 16 Dec 2024 17:46:48 +0300 Subject: [PATCH 08/11] #429: java 22 --- .github/workflows/itest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/itest.yml b/.github/workflows/itest.yml index f4f8778..a54aad9 100644 --- a/.github/workflows/itest.yml +++ b/.github/workflows/itest.yml @@ -36,7 +36,7 @@ jobs: strategy: matrix: os: [ ubuntu-24.04, macos-15, windows-2022 ] - java: [ 21 ] + java: [ 22 ] node: [ 16 ] # lang: [Java, JavaScript] lang: [ Java ] From 94845781299e7c9ab9c1670c2ac39d4eaf368e23 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 16 Dec 2024 17:51:36 +0300 Subject: [PATCH 09/11] #429: declare --- .github/workflows/itest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/itest.yml b/.github/workflows/itest.yml index a54aad9..46171d8 100644 --- a/.github/workflows/itest.yml +++ b/.github/workflows/itest.yml @@ -53,7 +53,7 @@ jobs: - run: npm install - run: | cd itest - opts=( + declare -a opts=( "../src/eoc.js" "--batch" "--language=${{ matrix.lang }}" From 4ef718bd3ad9263478a49388e8775ce902cdd460 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 16 Dec 2024 18:04:08 +0300 Subject: [PATCH 10/11] #429: slashes --- .github/workflows/itest.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/itest.yml b/.github/workflows/itest.yml index 46171d8..9c51225 100644 --- a/.github/workflows/itest.yml +++ b/.github/workflows/itest.yml @@ -53,11 +53,11 @@ jobs: - run: npm install - run: | cd itest - declare -a opts=( - "../src/eoc.js" - "--batch" - "--language=${{ matrix.lang }}" - "--easy" + declare -a opts=( \ + "../src/eoc.js" \ + "--batch" \ + "--language=${{ matrix.lang }}" \ + "--easy" \ ) node "${opts[@]}" link node "${opts[@]}" --alone dataize program From 991c444d56bbabfc95ed15b5c1e9e18514cc9403 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 16 Dec 2024 18:14:08 +0300 Subject: [PATCH 11/11] #429: bash --- .github/workflows/itest.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/itest.yml b/.github/workflows/itest.yml index 9c51225..c2e1b96 100644 --- a/.github/workflows/itest.yml +++ b/.github/workflows/itest.yml @@ -51,13 +51,14 @@ jobs: distribution: 'zulu' java-version: ${{ matrix.java }} - run: npm install - - run: | + - shell: bash + run: | cd itest - declare -a opts=( \ - "../src/eoc.js" \ - "--batch" \ - "--language=${{ matrix.lang }}" \ - "--easy" \ + declare -a opts=( + "../src/eoc.js" + "--batch" + "--language=${{ matrix.lang }}" + "--easy" ) node "${opts[@]}" link node "${opts[@]}" --alone dataize program