aboutsummaryrefslogtreecommitdiffstats
path: root/make/scripts/runtest.sh
Commit message (Collapse)AuthorAgeFilesLines
* Bump runtest.sh script w/ StringUtil testSven Göthel2024-02-041-2/+2
|
* Bug 1481 - Hide [ArgumentIs]PascalString argument's lengthSven Gothel2023-12-021-2/+2
| | | | | | | | Native pascal strings shall be just treated as normal Java strings on the Java side. Hence drop the length parameter across generated API, i.e. - C Function bindings - Java Callbacks
* Bug 1474: Only quote exe-file path on Windows for executionSven Gothel2023-11-281-2/+2
| | | | Double quoting of the exe-file for execution is only allowed and required on Window.
* Bug 1474: Allow temp folder for exe-file test to contain parenthesis on WindowsSven Gothel2023-11-281-2/+2
| | | | | | | | | | | If the temp path contains parenthesis on Windows, e.g. the username or the sub-temp folder, the used exeTestFile.getCanonicalPath() can't be used by 'Runtime.getRuntime().exec( path )'. Example: C:\Users\(ABC)abc\AppData\Local\Temp Output: Exe-Tst: 'C:\Users\' is not recognized as an internal or external command, operable program or batch file. Hence the complete canonical path must be quoted, i.e. Path: "C:\Users\(ABC)abc\AppData\Local\Temp"
* Bug 1479: NativeLibrary: Add getNativeLibraryPath() returning queried used ↵Sven Gothel2023-11-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | native library path, supported throughout DynamicLibraryBundle[Info] Motivation: It is helpful to retrieve the actually used native library pathname, since loading a library w/o absolute path but lookup through LD_LIBRARY_PATH may render it hard for the user to determine which library is used. +++ +++ Windows implementation simply can use GetModuleFileNameA() with the native library handle. POSIX implementation may utilize a symbol-name to retrieve its address within the loading native library used to retrieved the library information via dladdr(). To support this feature throughout DynamicLibraryBundle and DynamicLibraryBundleInfo, the custom DynamicLibraryBundleInfo specializations shall provide optional symbol-names per each tool-library-name for the POSIX implementation, see above. public interface DynamicLibraryBundleInfo { ... /** * Returns optional list of optional symbol names per {@link #getToolLibNames()} * in same order for an OS which requires the symbol's address to retrieve * the path of the containing library. */ public List<String> getSymbolForToolLibPath(); ... }
* Clock/Platform: Add currentMillis() analogue to currentNanos(), returning ↵Sven Gothel2023-10-061-1/+2
| | | | | | | | current monotonic milliseconds **since start of this application** Also added TSPrinter, a simple millisecond timestamp prepending `print*()` wrapper for a {@link PrintStream}. Test coverage via TestClock01.
* Add WorkerThread: A re-start'able, pause'able and interrupt'able worker ↵Sven Gothel2023-09-201-1/+2
| | | | thread with an optional minimum execution duration
* Bump JCPP: Use Unix '/' file separator in #line output for UNIFIED_OUTPUTSven Gothel2023-08-121-2/+2
|
* Bug 1450: Add test snippets covering the issues: test2.h for Bindingtest2, ↵Sven Gothel2023-08-101-1/+2
| | | | TestJCPP and new TestCParser
* Drop PCPP, GlueGen exclusively uses JCPP; Adopt test case Test{P->J}CPPSven Gothel2023-08-081-2/+2
|
* Bump jcpp (merged w/ jcpp upstream v1.4.14) and adopt to changesSven Gothel2023-08-081-13/+22
|
* Add notes `Loading a MacOS Native Library's Dependencies` and use absolute ↵Sven Gothel2023-08-051-6/+14
| | | | path in unit test script for library-path
* Cleanup unit test class names (pt3): Try to start w/ 'Test', remove ↵Sven Gothel2023-08-051-7/+7
| | | | intermediate 'Test' for supporting, non-test classes
* wip(test_case): Example of test case for issue related of ↵Mathieu Féry2023-08-041-3/+6
| | | | | | 927bbc7160a812bb29c0e7120d4a3009bfb13bbf Almost done
* GlueGen JavaCallback: 1st Working Draft: Changed 'JavaCallbackDef' config, ↵Sven Gothel2023-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added code generation incl. native to Java dispatch and resource management Tested via Test4JavaCallback.java (using test2.[hc]). Please read the GlueGen_Mapping.md as well as Test4JavaCallback.java . +++ Some implementation details: JavaConfiguration maps JavaCallbackDef to JavaCallback set-function and maintains a list. JavaCallbackDef itself holds all configured details. JavaConfiguration also maps JavaCallbackInfo to JavaCallback set-function. JavaCallbackInfo itself holds all compile time information, as produced by JavaEmitter.beginFunctions(..). This extends JavaCallbackDef and avoid repetetive computation for the callback-function-type and its MethodBinding, parameter indices for the callback interface and userParam, etc. CMethodBindingEmitter: Native callback to Java dispatch - The JavaCallback setter function creates a native 'UserParam' struct instance, which holds the callback-interface-jobject, its callback-jmethodID and the userParam-jobject for invocation of the actual JavaCallback interface method. - To produce the C-Type -> JNI-Type conversion, An internal CMethodBindingEmitter instance for the native-callback function binding is created inside the CMethodBindingEmitter of the callback setter method. It is being used to map the types to JNI within the generated native callback function, passed to the actual JavaCallback method. JavaMethodBindingEmitter: Native callback to Java dispatch - The JavaCallbacl setter passes the callback-interface-object, the userParam-object and the callback-method-signature (to have the native method retrieve the jmethodID). - It receives the native pointer of the native `UserParam` struct instance, which gets mapped to the userParam-object. (*TODO: Refine ownership + release*).
* GlueGen Struct [16]: Add support for pointer-pointer and function-pointer valuesSven Gothel2023-06-231-1/+2
| | | | See documentation and unit test test2.h, Test2FuncPtr.java and Test3PtrStorage.java
* GlueGen Test: Test2 -> Test2FuncPtrSven Gothel2023-06-231-1/+1
|
* GlueGen Struct [15]: Add FunctionPointer getter and setter support w/ ↵Sven Gothel2023-06-201-1/+2
| | | | documentation
* Windows java-win64.bat launch script: Set LIB_DIR to absolute path as ↵Sven Gothel2023-01-231-2/+2
| | | | required by System.load*()
* Windows Regression: Mingw64 8.1.0 using statical linked tool lib ↵Sven Gothel2019-08-191-5/+6
| | | | | | | | | | | | | | | | | | | Test1p1Test1p1JavaEmitter 'com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter' exposes a regression using MingW64 8.1.0: System.loadLibrary() gives a "Can't find dependent libraries". Here, 'Bindingtest1p1' is linked against 'test1' and fails to load due to its wrong dependent library name within 'Bindingtest1p1'. MingW64 8.1.0 dropped 'libtest1.so' into 'Bindingtest1p1.dll', which is surely wrong. Even passing '-Wl,-soname=test1.dll' didn't help. Note: Such constellation would only work with adding the lib-path to PATH on Windows. Since we don't utilize the method in any of our projects, but use the dynamic library lookup method - this is not a blocker, but wasted some good time.
* Bug 1369: SCC: Hide SHA Algorithm bit size in literals of SpecificationSven Gothel2019-04-031-2/+2
| | | | | Implementation currently uses 256 bit Secure Hash (SHA) algorithm, but this may change in the future. Hence only use 'SHA' in the names, not 'SHA256'.
* Bug 1367: TempJarCache: Fix Unit Test using ReflectionsSven Gothel2019-04-031-2/+2
|
* Bug 1369: Source Certification Contract (SCC): Initial SHA256 fingerprint & ↵Sven Gothel2019-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | runtime validation This change implements a strong SHA256 signature over: 1) source tree inclusive make recipe (SHA256-Source) 2) all class files (SHA256-Classes) 3) all native libraries (SHA256-Natives) 4) the class files as deployed in the jar (SHA256-Classes-this) 5) the native libraries as deployed in the jar (SHA256-Natives-this) and drops all of these in the deployed Jar file. This allows SHA256 validation of (4) + (5) at runtime and further complete validation (1), (2) and (3) offline. Full SCC would now required (1) - (3) to be placed on a server for further validation. Optionally we may use GPG <https://gnupg.org/> or PGP to validate the build entity to implement the chain of trust <https://en.wikipedia.org/wiki/Chain_of_trust> The SHA256 runtime validation is tested via: com.jogamp.common.util.TestVersionInfo
* Bug 1316: MacOSX: Keep *.dylib (Don't move to *.jnilib)Sven Gothel2019-03-301-1/+2
| | | | | | | | Since Java8 (or even earlier), JRE on OSX uses *.dylib native library suffix instead of *.jnilib when automatically searching and loading them. This is not easily being recognized by JogAmp, since we explicitly name the native libraries with full path when testing with our TempJarCache.
* Bug 1219, Bug 1231: Re-add executable test by executionSven Gothel2019-03-251-1/+2
| | | | | | | | | | | | | | | | | Re-adding executable test by execution is required for 'blocker technology' like Windows's 'Software Restriction Policies (SRP)', which only gets activated by the actual execution attempt. Merely testing the file's (ACL) execution flags via NIO's isExecutable is not sufficient. Implementation first tests the file's (ACL) execution flags via NIO's isExecutable. If the NIO test was successful or not available, the actual execution test is performed. To mitigate the virus scanner's false positive, we use an executable shell script per default now, which may be overriden by the new environment 'jogamp.gluegen.UseNativeExeFile=true' Tested on GNU/Linux with one temp folder having mount options 'noexec' and on Windows using Software Restriction Policies (SRP) disallowing one temp folder. Both temp folder were first in line via environment 'java.io.tmpdir'.
* Bug 1219, Bug 1231: Avoid deflating test-exe on Windows using ↵Sven Gothel2019-03-241-4/+4
| | | | | | | | | | | | | | | | | | java.nio.file.Files.isExecutable(Path) Attempt to resolved virus scanner false positive detection on Windows while deflating the native code test-exe file in the temporary folder. As Julien Gouesse suggested, using Java 1.7's java.nio.file.Files.isExecutable(Path) _may_ resolve the issue, this has to be thorougly tested. This patch favors the nio's isExecutable file's ACL test over the more intrusive execution itself using a simple shell script file w/ set executable flag. Mind that previous tests allowed the shell script's execution, even if the temp folder did not allow execution of native code. We have to see how our testing results will be on this attempt.
* Factor out Cleaner access for general use (Cleaning up NIO DirectBuffer)Sven Gothel2017-02-221-2/+3
|
* Version Semantics Test: Bump for 2.3.2 -> 2.4.xSven Gothel2015-10-121-2/+2
|
* Bug 1243 - Fix IOUtil.cleanPathString(..) special case ; Allow IOUtil and ↵Sven Gothel2015-10-031-3/+3
| | | | | | | | | | | | | | | | | Uri to handle relative path Fix IOUtil.cleanPathString(..) special case: Special case '/a/./../b' -> '/b' requires to resolve './' before '../'. Allow IOUtil and Uri to handle relative path: - IOUtil.getParentOf(..) - IOUtil.cleanPathString(..) Handle cases: 'a/./../b' -> 'b' '.././b' -> '../b' - Uri: Handle null scheme
* Bug 1219: IOUtil.testDirExe: Satisfactory when executed, more debug optionsSven Gothel2015-09-211-1/+2
| | | | | | | | | | | | | | | | | | | | IOUtil.testDirExe(): - Satisfactory when executed Failure to execute produce an IOException right at ProcessBuilder.start(). Hence we can allow an unexpected process exit value, since we only want to learn whether executable files are allowed. - More debug options DEBUG_EXE: 'jogamp.debug.IOUtil.Exe' DEBUG_EXE_NOSTREAM: 'jogamp.debug.IOUtil.Exe.NoStream' - if DEBUG_EXE - a pre-existing 'jogamp_exe_tst'+<SUFFIX> will be used as-is. - the test-exe will not be deleted - StreamMonitor is being used to dump stdout/stderr if !DEBUG_EXE_NOSTREAM.
* Bug 1219: Sporadic failure to determine 'executable temp base directory' on ↵Sven Gothel2015-09-191-3/+3
| | | | | | | | | | | | | | | | | | Windows using 'exe-windows-i586-268b.bin' (Fix attempt #1) Replacing the tiny 268 byte sized 'exe-windows-i586-268b.bin' PE file w/ a regular 2048 byte sized PE file 'exe-windows-i386-2048b.bin'. File is produced via: c:\mingw\bin\gcc -nodefaultlibs -nostdlib -s -Os -o tiny.exe tiny.c Adding the 305 byte sized gzipped version 'exe-windows-i386-2048b.bin.305b.gz' to the gluegen-rt jar file to reduce the payload for non Windows platforms. Adding special property 'jogamp.debug.IOUtil.Exe' to debug testing the exe file, enable via '-Djogamp.debug.IOUtil.Exe'. Passes here on all Windows machines, however, the prev. one worked here as well.
* Bug 1213: Refine changes .. comments and APISven Gothel2015-09-151-3/+3
| | | | | | | | | | | | | | - Use InterruptSource.Thread.create(..), while reducing InterruptSource.Thread ctors to 3 variants. - Use InterruptSource.Thread instead of java.lang.Thread where possible - Use SourcedInterruptedException where possible - SingletonInstanceServerSocket: start(), stop() and run() - Persistent-Wait and Cancelable - Add @since 2.3.2
* Bug 1145, Bug 1172: Add performance counter for native-jar lookup: Property ↵Sven Gothel2015-08-181-3/+4
| | | | 'jogamp.debug.JNILibLoader.Perf'
* Bug 1172: TempJarCache: Only copy native library files from ↵Sven Gothel2015-08-181-3/+3
| | | | | | | | 'natives/os.and.arch', reducing JAR search. Since all native libraries are now contained within 'natives/os.and.arch', we don't need to search the whole JAR file anymore but simply can copy the content of the defined folder - if existing.
* Bug 1194: Reinstate system-lib search for NativeLibrary.open(..) and ↵Sven Gothel2015-08-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PlatformPropsImpl.findSysLib(..). This patch partially reverts of commit d12e4d4ea279998b27457691038e709879dcaca6. NativeLibrary.open(..) requires search of system libraries, since it loads the actual 'tool library' for which we generate the JNI binding. The 'tool library' is preferably the system wide installed version, e.g. libGL.so etc. PlatformPropsImpl.findSysLib(..) also requires finding system libraries as needed for PlatformPropsImpl.queryElfFile(..), i.e. using libjava.so etc. Only the JNI 'glue library', glueing java calls to the 'tool library', shall not use the system wide library search since we shall only use JogAmp provided instances here. This patch also reinstates binary compatibility w/ prev. GlueGen JARs since NativeLibrary.enumerateLibraryPath(..) is public. +++ Further more 'NativeLibrary.enumerateLibraryPath(..)' now adds OSX system framework search _before_ the user path in case 'searchSystemPath && searchSystemPathFirst'. Original code always added this search to the end, which does not match the intended behavior (-> bug).
* Bitfield: Refine API method names, add clearField(boolean), fix put32(..) ↵Sven Gothel2015-08-021-1/+2
| | | | and bitCount(), add unit test (passed)
* Bug 1180 BuffersTest: Refine test case a bit, add static main for standalone ↵Sven Gothel2015-07-241-1/+2
| | | | tests
* Bump semantic-versioning (0.9.33 + jogamp fixes)Sven Gothel2015-04-031-2/+2
|
* Add ArrayHashMap; Use 'supportNullValue' optimizing ArrayHashSet and ↵Sven Gothel2015-04-011-2/+3
| | | | | | ArrayHashMap; Unify ctor for both impl. Add/Enhance unit tests for both.
* TestVersionSemantics: Add version tests: v220 -> v221, v221 -> v230 and v230 ↵v2.3.1Sven Gothel2015-03-271-2/+2
| | | | -> v23x
* Bug 1149 - Fix JCPP test case IncludeAbsoluteTestSven Gothel2015-03-251-2/+2
|
* Bug 1149: Fix parsing of hexadecimal w/ binary exponent floats in ↵Sven Gothel2015-03-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | regexp-constant and java-parser. (Due to PCPP -> JCPP) Lack of parsing binary exponent floats is exposed due to using JCPP and correct constant-definitions. - JavaParser.g: - Add support for hexadecimal w/ binary exponent floats - TAB -> 4 spaces - ConstantDefinition.java: - Add RegExp 'fpRegexp', patternDecimalNumber: decimal number w/ support for hexadecimal w/ binary exponent floats. - isDecimalNumber(..): Use patternDecimalNumber instead of try-and-error (NumberFormatException) - patternCPPOperand: exclude patternDecimalNumber! - JavaEmitter.java: - Respect explicit suffix [dD] for double type. - Drop floating point suffixes [fF] - Test: Added tests for hexadecimal w/ binary exponent floats
* Bug 1149 - Replacing PCPP w/ JCPP, allowing complete macro handling (Part-2: ↵Sven Gothel2015-03-241-8/+19
| | | | JCPP submodule, build, test and doc)
* Bug 1144 - Add 'DelegateImplementation': Cleanup ↵Sven Gothel2015-03-111-2/+2
| | | | | | | | MethodBinding/FunctionBinding Semantics - Clarify name semantics: name -> [interfaceName, implName, nativeName] - JavaMethodBindingEmitter: Refine native identity via isNativeMethod + isPrivateNativeMethod - ProcAddressEmitter: Remove hack whether we need to wrap .. use isNativeMethod + isPrivateNativeMethod
* TestByteBuffer*Stream: Reduce mmap load on poor OSX mini test machine to ↵Sven Gothel2015-03-061-2/+2
| | | | reduce test time (was: > 10 min)
* Bug 1134 - Enhance GlueGen Compiler: Minimal GL Header Changes _and_ TypesafetySven Gothel2015-03-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - We shall be able to import 'most' vanilla GL header, i.e. only change the typedef part using our GlueGen types - Type Safety: - GlueGen now detects '#define' and 'enum' redefines and throw an exception in this case. This helps detecting wrongly renamed GL extensions into core! - GlueGen now detects function redefines (overloading) and throw an exception in this case. Hence the semantics of duplicate functions has to be equal! This helps detecting wrongly renamed GL extensions into core! - Semantic equality for all types is provided via interface TypeComparator.SemanticEqualityOp, i.e. 'boolean equalSemantics(..)' implemented by com.jogamp.gluegen.cgram.types.Type. Semantic equality can be relaxed via config "RelaxedEqualSemanticsTest true", i.e. ignoring integer size, and const / volatile qualifiers. - All equality/hash methods of 'com.jogamp.gluegen.cgram.types.*' are restructured. - Track and simplify renamed 'symbol', i.e. use a common sub-interface for all renamed symbols (ConstantDefinition, FunctionSymbol, ..) - This is provided in a unified manner via interface com.jogamp.gluegen.cgram.types.AliasedSymbol and its common implementation AliasedSymbolImpl - All JavaConfiguration.shouldIgnore* methods operate w/ 'AliasedSymbol' trying to match all aliases. - Support 'struct NAME [ { ... } ]' w/o typedef's - New GL / CL headers do not use typedef's for anonymous opaque types - Opaque Type handling - JavaConfiguration.typeInfo(..), identifying opaque types, no more back references from target-type -> typedef. Hence the following is possible now: typedef void * Opaque01; // Opaque typedef void * APointerBuffer; // A Buffer - All Logger instances are no more static and derive their warning level from the package's root Logger via Logging.getLogger(..).
* Bug 1126 - Remove static query requirement of MachineDescriptor, find ↵Sven Gothel2015-02-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | matching StaticConfig at runtime; Fix PPC (Bug 1056) and MIPSLE (Bug 1014) issues. Currently the StaticConfig is being queried via the key[OSType, CPUType ..] as pre-determined by Java properties or the ELF parser. This adds complication to maintain different platforms and the key query might not even be sufficient. The MachineDescriptor's StaticConfig only purpose shall be to speed-up native data size and offset/alignment retrieval. This is done by using the StaticConfig index within all StaticConfig[]s as a lookup-index for the precomputed struct's size and offset tables. +++ Solution: Rename: MachineDescriptor -> MachineDataInfo Rename: MachineDescriptorRuntime -> MachineDataInfoRuntime After having defined os.and.arch (OSType, CPUType and ABIType) w/ the optional help of the now self containing ELF Reader (Bug 1125), the native gluegen-rt library gets loaded enabling JNI methods. It is satisfactory to retrieve MachineDataInfo at runtime w/ JNI and find the matching/compatible StaticConfig. Only in case none is found, the program needs to abort. Otherwise the found MachineDataInfo.StaticConfig and MachineDataInfo are stored for further use (see above). This removes above complication and key to StaticConfig mapping. New platforms simply need to add a new unique entry into the StaticConfig[] table. ++ Also fixes Bug 1056 (PPC), thanks to tmancill [@] debian [.] org, and Bug 1014 (MIPSLE), thanks to Dejan Latinovic. Parts of the patch for Bug 1014 from Dejan Latinovic are included. also solved by this change set.
* Bug 1125 - Make ELF Reader 'jogamp.common.os.elf' StatelessSven Gothel2015-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | ELF Reader 'jogamp.common.os.elf' currently uses Platform's pre-determined OS_TYPE and CPUType. It also uses the host platforms MachineDescription, hence can not read ELF files from other machines. This also forbids Platform to determine CPUType etc w/o having a valid 'os.arch' property. +++ ElfHeader should be split in - ElfHeaderPart1 (CPUType independent) - ElfHeaderPart2 (CPUType dependent) Fix shall make the ELF Reader self containing by only using ELF CPUType data, etc. This requires customization of struct parsing, where MachineDescription.Static index shall be - defined in ElfHeaderPart1 using e_Ident's CPUType. - used in ElfHeaderPart2 and all its struct types.
* test scripts: Bump JRE, add TEMP/TMP settingsSven Gothel2014-12-121-1/+1
|
* Bug 1108 - IOUtil.getTempDir(..): Difficulties to determine executable ↵Sven Gothel2014-12-111-8/+6
| | | | | | | | | | | | access permission on Windows via BATCH file execution Try using explicit call to Windows 'cmd.exe' w/ referencing the BATCH file location, via 'Runtime.getRuntime().exec(new String[] { "cmd", "/c", "a.bat" } );' While the bug itself could not be reproduced here, I could test on Windows 7 (64bit and 32bit), as well as an WindowsXP 32bit that no regression occured.