diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d1d77e7a64..9621b2cbb02 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -150,18 +150,28 @@ jobs: uses: stCarolas/setup-maven@v4.5 with: maven-version: 3.9.2 + - name: Run spctl --master-disable + run: sudo spctl --master-disable - name: Build working-directory: features/org.eclipse.equinox.executable.feature/library/cocoa run: ./build.sh test shell: bash + - name: screenshot + if: always() + uses: OrbitalOwen/desktop-screenshot-action@0.1 + with: + file-name: 'desktop.jpg' - name: Upload artifacts uses: actions/upload-artifact@v4 - if: success() + if: always() with: name: MacOS launcher artifacts path: | + features/org.eclipse.equinox.executable.feature/ features/org.eclipse.equinox.executable.feature/library/cocoa/eclipse features/org.eclipse.equinox.executable.feature/library/cocoa/eclipse*.so + desktop.jpg + screenshot.png if-no-files-found: error - name: Upload MacOS Test Results uses: actions/upload-artifact@v4 diff --git a/features/org.eclipse.equinox.executable.feature/library/cocoa/build.sh b/features/org.eclipse.equinox.executable.feature/library/cocoa/build.sh index 437bb371d21..557fc1676a7 100755 --- a/features/org.eclipse.equinox.executable.feature/library/cocoa/build.sh +++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/build.sh @@ -94,6 +94,7 @@ fi if [ "$extraArgs" != "" ]; then make -f $makefile $extraArgs + ../org.eclipse.launcher.tests/target/test-run/eclipse >log.txt & else echo "Building $defaultOS launcher. Defaults: -os $DEFAULT_OS -arch $DEFAULT_OS_ARCH -ws $DEFAULT_WS" make -f $makefile clean diff --git a/features/org.eclipse.equinox.executable.feature/library/cocoa/make_cocoa.mak b/features/org.eclipse.equinox.executable.feature/library/cocoa/make_cocoa.mak index 3a58682f7ec..f5505fc89f8 100644 --- a/features/org.eclipse.equinox.executable.feature/library/cocoa/make_cocoa.mak +++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/make_cocoa.mak @@ -99,16 +99,18 @@ ifneq ($(filter "$(origin DEV_ECLIPSE)", "environment" "command line"),) $(info Copying $(EXEC) and $(DLL) into your development eclipse folder:) mkdir -p ${DEV_ECLIPSE}/ cp $(EXEC) ${DEV_ECLIPSE}/ - mkdir -p ${DEV_ECLIPSE}/plugins/$(LIBRARY_FRAGMENT_NAME)/ - cp $(DLL) ${DEV_ECLIPSE}/plugins/$(LIBRARY_FRAGMENT_NAME)/ + mkdir -p ${DEV_ECLIPSE}/../Eclipse/plugins/$(LIBRARY_FRAGMENT_NAME)/ + cp $(DLL) ${DEV_ECLIPSE}/../Eclipse/plugins/$(LIBRARY_FRAGMENT_NAME)/ else $(error $(DEV_INSTALL_ERROR_MSG)) endif test: + $(eval export DEV_ECLIPSE=../org.eclipse.launcher.tests/target/test-run) + $(eval export ECLIPSE_INI_LOCATION=../Eclipse/eclipse.ini) mvn -f ../org.eclipse.launcher.tests/pom.xml clean verify -Dmaven.test.skip=true - make -f $(firstword $(MAKEFILE_LIST)) dev_build_install LIBRARY_FRAGMENT_NAME=org.eclipse.equinox.launcher DEV_ECLIPSE=../org.eclipse.launcher.tests/target/test-run - mvn -f ../org.eclipse.launcher.tests/pom.xml test + make -f $(firstword $(MAKEFILE_LIST)) dev_build_install LIBRARY_FRAGMENT_NAME=org.eclipse.equinox.launcher +# mvn -f ../org.eclipse.launcher.tests/pom.xml -DargLine="-DECLIPSE_INI_LOCATION=../Eclipse/eclipse.ini" test define DEV_INSTALL_ERROR_MSG = Note: diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipseConfig.c b/features/org.eclipse.equinox.executable.feature/library/eclipseConfig.c index ebd6abaf377..238670539a5 100644 --- a/features/org.eclipse.equinox.executable.feature/library/eclipseConfig.c +++ b/features/org.eclipse.equinox.executable.feature/library/eclipseConfig.c @@ -88,6 +88,7 @@ _TCHAR* getIniFile(_TCHAR* program, int consoleLauncher){ bname = basename(basec); config_file = realloc(config_file, strlen(dname) + strlen(bname) + 16 * sizeof(char)); sprintf(config_file, "%s/Eclipse/%s.ini", dname, bname); + printf("%s\n", config_file); free(dirc); free(basec); #else diff --git a/features/org.eclipse.equinox.executable.feature/library/org.eclipse.launcher.tests/src/test/java/LauncherTests.java b/features/org.eclipse.equinox.executable.feature/library/org.eclipse.launcher.tests/src/test/java/LauncherTests.java index 0676d6ead01..f3ba0c043d6 100644 --- a/features/org.eclipse.equinox.executable.feature/library/org.eclipse.launcher.tests/src/test/java/LauncherTests.java +++ b/features/org.eclipse.equinox.executable.feature/library/org.eclipse.launcher.tests/src/test/java/LauncherTests.java @@ -39,7 +39,9 @@ import main.TestLauncherConstants; public class LauncherTests { - private static final String ECLIPSE_INI_FILE_NAME = "eclipse.ini"; + private static final String ECLIPSE_INI_LOCATION_KEY = "ECLIPSE_INI_LOCATION"; + private static final String ECLIPSE_INI_FILE_NAME = System.getProperty(ECLIPSE_INI_LOCATION_KEY, + System.getenv(ECLIPSE_INI_LOCATION_KEY) == null ? "eclipse.ini" : System.getenv(ECLIPSE_INI_LOCATION_KEY)); // @formatter:off private static final String DEFAULT_ECLIPSE_INI_CONTENT = "-startup\n" + "../test.launcher.jar\n"