Error when I try to get an environment variable from the command line in gradlew - junit5

I'm using Gradle 7.4 and Junit5.
I need to sent a envinronment variable by command line. Example: teste="1".
❯ ./gradlew :test -Dteste=1 --tests "tests.run.Mytest"
Assertions.assertEquals("1", System.getenv("teste")); - Here it receive null.
When I sent on Intellij, it works:
enter image description here

Related

io2d error for command msbuild INSTALL.vcxproj error

I'm trying to install io2d in order to build the RoutePlanning Project provided in this link:
https://github.com/udacity/CppND-Route-Planning-Project
However when entering the command:
msbuild INSTALL.vcxproj
I get this error at the end:

How to debug the openjdk9 by netbeans8.2 in win10?

When I tried to debug the openjdk9 by netbeans8.2 in win10, I got the following error:
"\"D:/jdk9/jdk9/build/windows-x86_64-normal-server-fastdebug/jdk/bin/java.exe\":
not in executable format: File format not recognized"
How can I fix it?
I build the source code by command "./configure -with-freetype=/cygdrive/c/freetype -enable-debug -with-target-bits=64", then run make all, I also tried slowdebug, however, that also failed.
If I "run" the project instead of "debug", it runs successfully like below, so there is no issue for the file windows-x86_64-normal-server-fastdebug/jdk/bin/java.exe, it seems the gdb doesn't recognize the java.exe file.
Also I opened the openjdk source code from the location D:/jdk9/jdk/common/nb_native by netbeans, see below:
And tried to build it by netbeans, however, it produces the following error:
cd 'D:\jdk9\jdk\common'
sh ../configure --with-freetype=/cygdrive/c/freetype --with-debug-level=slowdebug --with-target-bits=64
/cygdrive/d/jdk9/jdk/configure: /cygdrive/d/jdk9/jdk/common/autoconf/configure: No such file or directory
PRE-BUILD FAILED (exit value 1, total time: 743ms)
I know that both paths /cygdrive/d/jdk9/jdk/configure and /cygdrive/d/jdk9/jdk/common/autoconf/configure exist.
This is how I configured the pre-built commands:
If you build the openjdk -with-target-bits = 64, then make sure that you installed a 64-bit gdb, or build the openjdk in 32-bit mode.
Your steps to import the nbproject looks correct.
Change Build => Pre-Build properties:
Set "Working Directory" to ../..
Set "Command Line" to sh ./configure ...

Error when try to compile Chromium

I try to use the command ninja -C out/Debug chrome to compile Chromium.
However the error msg says that:
ninja error loading 'build.ninja': the system cannot find the file specified
ninja Entering dictory 'out/Debug'
Could I know what's the problem?
Thanks.
The out directory and its contents (including build.ninja) are created by running
python build\gyp_chromium
or
gclient runhooks
Executing either command from within /src should allow your compile to proceed.
On Windows machine!
When I was running gn gen out/Default it also gave me an error:
ERROR at //build/config/win/visual_studio_version.gni:27:7: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py", [ "get_toolchain_dir" ], "scope")
^----------
Current dir: D:/Chromium/src/out/Goma/
Command: C:/Python27/python.exe -- D:/Chromium/src/build/vs_toolchain.py get_toolchain_dir
Returned 1 and printed out:
Please follow the instructions at https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
I did the following steps and it worked for me.
Set this variable. Reference (not sure about its purpose yet)
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
Run the command gn gen out/Default
Run the build command again
autoninja -C out/Default chrome
It is also recommended to run gclient sync from out/Default directory.
After the switch to "gn" you could try:
gn gen out/Debug

xcodebuild failed to launch '/Applications/Xcode.app/Contents/Developer/Tools/otest' via Jenkins

error: failed to launch '/Applications/Xcode.app/Contents/Developer/Tools/otest' -- failed to get the task for process 34796
Hi,
When I run the command:
/usr/bin/xcodebuild -scheme my_scheme_name -configuration Debug build test
I get the following error:
error: failed to launch '/Applications/Xcode.app/Contents/Developer/Tools/otest' -- failed to get the task for process 34796
This only happens when the command is executed via Jenkins. Doesn't happen when I execute it from command line.
Has anyone else run into something like this?
The build itself builds an objective c library and the tests are SenTestCases. It's not an iOS app - it's an objective c library to be used in various apps
I used sudo DevToolsSecurity -enable to get past this problem.

sencha build giving error stbuild exited with non-zero code : 7

I wanted to create .apk file of my sencha application so I executed below command
sencha package build packager.json
but when I executed above command,it generates error as given below.
'C:\Program' is not recognized as an internal or external command,operable program or batch file.
""D:/Android/AndroidSDKr15\tools\android" create project --target android-16 --name chartDemoApp --activity STActivity --path "../build/" --package triumphsys. mobility.chartDemoApp"
Could not run ant with error: 1
Failed to package application
[ERR] stbuild exited with non-zero code : 7
even I have attached my command prompt here and packager.json here.
please help me to resolve it.
I was able to solve the problem by uninstalling "C:\Program files\Sencha Cmd" and again re-installing it at "C:\Sencha" without any spaces in folder name. and it worked for me.