summaryrefslogtreecommitdiffstats
path: root/make/scripts/runtest.sh
Commit message (Collapse)AuthorAgeFilesLines
* Bug 908: Fix URI/URL double encoding, ensuring encoded/decoded variants are ↵Sven Gothel2014-09-071-3/+4
| | | | | | | | | | | | | | | | | | | | used properly (Added unit test) Bug 908 was caused by confusing URI encoded parts (e.g. scheme-specific-part) and it's decoded variant. This especially happened due to: - the fact, that the encoded and unencoded variant uses the same String type, - the URI/URL decoding differs, is not complete (e.g. %20 .. SPACE remains in decoded part), - and does not comply w/ RFC 2396 and RFC 3986 (encoding), e.g. not all RESERVED chars are encoded. In branch 'v2.3.0_branch', we will introduce our own Uri and Uri.Encoded class to solve above issue by replacing all URI usage w/ Uri. - Backporting results of own Uri class introduction in branch 'v2.3.0_branch' - Ensure the encoded URI parts are used where required, i.e. IOUtil.compose(..) etc - TestNetIOURIReservedCharsBug908: Automated test, launching GlueGen jar file from an <i>odd pathname</i>.
* TestVersionSemantics: BACKWARD_COMPATIBLE_USER current vs 2.2.0Sven Gothel2014-08-281-2/+2
|
* Bug 1015: Test executable permission on Windows via bat file (temp dir, like ↵Sven Gothel2014-08-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | on unix and osx) Tested on Window 7 and Windows 8.1 using 'Using Software Restriction Policies', i.e. disabled sw-execution in TEMP dir. On Windows we need to add min. shell code, here 'echo off', allowing the bat file to be executed if policy allows it. Reminder: We test the following temp folder 1) java.io.tmpdir/jogamp 2) $XDG_CACHE_HOME/jogamp 3) $TMPDIR/jogamp or $TEMP/jogamp 4) $HOME/.jogamp +++ Misc: Proper 'duplicate' validation via 'file1.equals(file2)' test using the abstract pathname.
* IntIntHashMap: Reduce temp. ArrayList<Entry> instances in cloneSven Gothel2014-08-161-2/+2
|
* Bug 1024: Add fallback for native-jar-file location via classpathSven Gothel2014-07-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In situations, where the native-jar file is not located within the same parent URI as it's java-jar file, our location mechanism fails. This patch adds a classloader based native-jar file location mechanism as a fallback, requiring the native jar file to be included in the users CLASSPATH. Classloader based location algorithm in JNILibLoaderBase.addNativeJarLibsImpl(..): - Extract the 'module-name' from the given classFromJavaJar's package name, i.e. the last package-part: 'jogamp.common.Debug' -> 'common' Hence it is important to pass a 'classFromJavaJar', which last package segment reflects the module-name! - <os.and.arch> -> <os_and_arch_dot>, e.g. linux-amd64 -> linux.amd64 (linux/amd64) - Locate class 'jogamp.nativetag.<module-name>.<os_and_arch_dot>.TAG', e.g. 'jogamp.nativetag.common.linux.amd64.TAG' - Use located class's JarFile URI .. continue as usual Injection of above mentioned TAG class via gluegen-cpptasks-base.xml macro 'native.tag.jar': - Creates dummy TAG.java code - Compiles TAG.java - Creates the native-jar file Example: <native.tag.jar objdir="${build}/obj" nativejarfile="${build}/gluegen-rt-natives-${os.and.arch}.jar" manifestfile="${build}/Manifest-rt-natives.temp" module="common" includelibs="*gluegen-rt.${native.library.suffix}" /> Note that the manifest file uses a matching Extension-Name: Extension-Name: jogamp.nativetag.common
* GlueGen: Add support for 'compound call-by-value', i.e. passing and ↵Sven Gothel2014-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | returning struct instance 'compound call-by-value' is not efficient. However, to allow mapping APIs utilizing passing small structs as arguments and return values - this feature has been added. +++ To return the struct value, native code needs to allocate a NIO ByteBuffer and copy the data. The stack return value can be dismissed afterwards and the NIO buffer is returned. We include this functionality for all generated [impl] classes, native method: 'static jobject JVMUtil_NewDirectByteBufferCopy(JNIEnv *env, void * source_address, jlong capacity)' (See: 'JavaEmitter.initClassAccessCode') Since this code requires knowledge of java classes and methods, for which a reference needs to be acquired, a static initialization method has been introduced for all generated [impl] classes: 'private static native boolean initializeImpl();' Per default the this method will be called in the new static initializer block of the class, which can be supressed via the configuration element: 'ManualStaticInit <class-name>' 'ManualStaticInit' can be used to issue the 'initializeImpl()' call in a custom static initializer written by the user. However, at the time 'initializeImpl()' gets called the JNI native library must have been loaded, of course! +++ - See tag: // FIXME: Compound call-by-value for code changes and validation of completeness Trigger for compond call-by-value in CMethodBindingEmitter is: !cArgType.isPointer() && javaArgType.isCompoundTypeWrapper() Trigger for compond call-by-value in JavaEmitter is: t.isCompound() +++ Further more we do tolerate 'javaType.isCPrimitivePointerType()', i.e. adding comments for offset/size and field entries, which are all NOP. This allows to utilize the remaining fields of the native structure. +++ Tests: Added call-by-value to test1.[ch] binding test!
* Unit Test: Modularize Semantic Version Test / Fix 'excludes'Sven Gothel2014-05-131-2/+2
| | | | | | | Refactor base semjar unit test class into com.jogamp.junit.util.VersionSemanticsUtil, part of new gluegen-test-util.jar. The new gluegen-test-util.jar shall be used by all other modules to test versioning.
* Unit Test: Added Semantic Version Test (Current version agains v2.1.5)Sven Gothel2014-05-131-4/+4
| | | | | | | | | | | | | TestVersionSemantics adds testing of semantic versioning of 2.1.5 gluegen-rt.jar against the current version within a unit test. Currently we expect BACKWARD_COMPATIBLE_USER and need to toggle this to NON_BACKWARD_COMPATIBLE, if actually perfoming non compatible major or minor version changes. The latter is allowed right now, since we increment from 2.1 -> 2.2! - Added https://github.com/jeluard/semantic-versioning semver.jar (Apache License Version 2.0)
* Bug 923: Remove dependency of CStruct annotation processor _generation_ and ↵Sven Gothel2014-05-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generated_class_user due to Java8 issues. Java8's annotation processor as embedded within javac does not allow referencing not-yet existing generated classes in a class source code which will produce these generated classes via the annotation process. Example: +++ import com.jogamp.gluegen.structgen.CStruct; public class Lala { @CStruct(name="RenderingConfig", header="TestStruct01.h") public RenderingConfig config; } +++ Above example illustrates that the type 'RenderingConfig' does not exist at time of processing the annotation. The type will be created via the annotation process itself. Even though we pass '-proc:only', i.e. skip java compilation, Java8's annotation processing via javac fails in such case. We see this as a bug within javac's annotation processing itself! +++ This workaround splits the annotation process and using the class as generated by the former. To allow this to work, CStruct receives a new field 'jname' allowing to enforce the java-name of the structure using a dummy field type like boolean. @CStruct(name="RenderingConfig", jname="RenderingConfig", header="TestStruct01.h") public boolean dummy; Further more CStruct can be annotated on the package, i.e. 'package-info.java', avoiding the dependency problem altogether. To support multiple header files and types, 'CStructs' has been introduced using an array of 'CStruct'. @CStructs({@CStruct(name="RenderingConfig", header="TestStruct01.h"), @CStruct(name="Pixel", header="TestStruct02.h")}) package com.jogamp.gluegen.test.junit.structgen; Tests: - Build w/ Java7 and Java8 - Validated 'major version 50' (Java 6) class files (OK)
* build/test: Add ant-junit4.jar to classpath; Add experimental gluegen-rt-alt ↵Sven Gothel2014-05-091-15/+16
| | | | recipe (inactive); Misc ..
* Bug 980: Refine Bitstream API 'signed' and 'unsigned' semantics - ↵Sven Gothel2014-02-211-4/+4
| | | | readUInt32(..) must return long due to EOF
* Bitstream: Add static 'long toUint32Long(int)' and 'int toUint32Int(int)' ↵Sven Gothel2014-02-211-2/+2
| | | | conversion functions
* Bug 890: Adding versatile Bitstream implementationSven Gothel2014-02-201-3/+9
| | | | | | | | | | | | | | | | We already have several locations where bitstream operations are required and partially implemented (JPEG decoder, media parsing, ..) as well as endian related conversion (elf parser, ..). Create a versatile Bitstream class allowing: - Utilize I/O operations on I/O streams, buffers and arrays - Consider MSBfirst / LSBfirst mode - Linear bit R/W operations - Bulk R/W operations w/ endian related type conversion - Allow mark/reset and switching streams and input/output mode - Optimized operations Complete set of unit tests included, covering hopefully all cases.
* Bug 856 - Android: Support dual ABI (x86 i686 *and* ARMv7arm), i.e. pick ↵Sven Gothel2014-01-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'best' ABI - Use 'os.arch' as a prelim CPUType for MachineDescription - Always attempt to load a binary and parse it's elf header - Linux: self-exe - Android: gluegen-rt library - Other: java lib - Always use details (ABI) if ARM - Android: Check CPU_TYPE and CPU_TYPE2 // FIXME / HACK: // We use sCPUType for MachineDescriptionRuntime.getStatic() // until we have determined the final CPU_TYPE, etc. // MachineDescriptionRuntime gets notified via MachineDescriptionRuntime.notifyPropsInitialized() below. // // We could use Elf Ehdr's machine value to determine the bit-size // used for it's offset table! // However, 'os.arch' should be a good guess for this task. Tested manually on - Linux x86, x86_64, armhf (raspi) - Android intel and arm - Windows x86_64 - OSX x86_64
* Bug 945 - GlueGen's IOUtil does not consider file URI's authority when ↵Sven Gothel2014-01-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | converting to file-path or URI (Windows UNC / share host) Note: Authority for 'file-scheme' URI's is used on Windows to denote the host of the shared resource -> UNC Following methods of IOUtil didn't consider the authority for file-scheme URI: 'URL toURL(final URI uri)' 'String decodeURIToFilePath(final String uriPath)' 'String decodeURIIfFilePath(final URI uri)' Further more, the patterns 'patternSingleFS' and 'patternSingleBS' converted multiple '\' '/' to one replacement. However, we should not change the separator count and replace them one-by-one. TestIOUtilURIHandling: - Added shared-file-host 'filehost' test cases to file URIs and plain file path tests. - Passed on Unix and Windows. Added 'make/scripts/test-win32-smb_share.bat' - Testing actual windows share usage - Passed on Windows
* Bug 944 - Platform doesn't parse early-access java-version string properly ↵Sven Gothel2014-01-141-2/+2
| | | | | | | | | (JAVA_VERSION_UPDATE) Fix JAVA_VERSION_UPDATE for early release versions. Early access java versions are e.g. '1.7.0_60-ea' where releases simply are named: '1.7.0_60'.
* IOUtil.toURL(..) Apply decodeFromURI(uri.getPath()) if file-scheme; Add ↵Sven Gothel2013-11-281-2/+3
| | | | | | | | | | | | | | | | | | | IOUtil.decodeURIToFilePath(..) for native usage. Refine comments, API doc. toURL(..): Apply space conversion, decodeFromURI(..), on file-scheme path, ensuring decoded space. ++ Add decodeURIToFilePath(String uriPath) and decodeURIToFilePath(URI uri) Both methods shall simplify decoding a file-URI for native platform usage. Tested in TestIOUtilURIHandling +++
* TempJarCache: Make 'initialization' query/flag thread safe, i.e. synchronize ↵Sven Gothel2013-10-241-3/+3
| | | | | | | if !isInit (dbl-check locking) - isInit must be set to 'true' _after_ actual initialization, so caller can be blocked until done - staticInitError must be volatile as well
* Fix Bug 857: GlueGen produces erroneous file URI on Windows, which breaks ↵Sven Gothel2013-10-181-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Netbeans's JarURLStreamHandler - 'URL IOUtil.toURL(URI)' - Needs to encode the file-path portion on Windows(*) if exists. The file-path here shall only be encoded as follows: - backslash -> slash - ensure starting with slash (*) We perform above action for all OS, if 'false == File.separator.equals("/")' - Added high verbosity in DEBUG mode to easy debugging for future cases .. - Cleanup URI/URL unit tests, i.e. split URLCompositionTest into: - TestIOUtilURICompose - TestIOUtilURIHandling (Now covers Bug 857 as well) - TestUrisWithAssetHandler - TestURIQueryProps Tested all unit tests manually on GNU/Linux and Windows w/ JRE 7u45
* Bug 816: Add Platform.JAVA_VERSION_UPDATE - Allowing to determin whether JVM ↵Sven Gothel2013-09-221-2/+2
| | | | is >= 1.7.0u40
* Bump junit 4.8.2 -> 4.11 (incl. hamcrest 1.2) ; TestTempJarCache uses ↵Sven Gothel2013-08-311-2/+2
| | | | | | | | | | | | | '@FixMethodOrder(MethodSorters.NAME_ASCENDING)' annotation Issue: Java7 unit test order is no more predictable Fix: junit 4.11 performs a determined (not defined default) test order. Additionally user can force ascending method name test order Produced a drop-in junit.jar / junit-source.zip replacement, which includes - junit version version 4.11 - hamcrest-core version 1.3
* Add URIQueryProps: Simple tool to process URI queries as propertiesSven Gothel2013-08-281-3/+3
|
* *Ringbuffer: Remove Ringbuffer<T>.AllocEmptyArray interface to favor a more ↵Sven Gothel2013-08-241-1/+1
| | | | | | | | | | | | | | | simple approach; Split 'grow' into 'growEmpty' and 'growFull' - java.lang.reflect.Array can instantiate an array w/ a given array-type and length - array-type is Class<? extends T[]> - We either deduct the array-type via array.getClass(), or pass it (ctor for empty Ringbuffer). - Split 'growBuffer(T[] newElements, int amount, ..)' into: - 'growEmptyBuffer(T[] newElements)' - 'growFullBuffer(int amount)' Allowing a more clean API w/ simpler semantics.
* Add Ringbuffer interface an 2 implementations, synchronized (locking) ↵Sven Gothel2013-08-221-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | SyncedRingbuffer and lock-free LFRingbuffer. SyncedRingbuffer is moved from JOGL to GlueGen, and generalized w/ common interface Ringbuffer to allow testing diff. implementations. - Added Ringbuffer.AllocEmptyArray factory interface, allowing to pass a constructor to construct the generic array. - Added functionality is growBuffer(..), allowing to either grow a full or empty buffer, using Ringbuffer.AllocEmptyArray. - Removed explicit 'clearRef' at get*(..), always clear the taken reference for better interface generalization. - Added LFRingbuffer, exposing lock-free get*(..) and put*(..) methods using the 'Always Keep One Slot Open' pattern using the read/write index as barriers only. - Ctor's copy an optional passed user array into the internal array, utilizing Ringbuffer.AllocEmptyArray. - Added unit tests.
* Release 2.0.2Sven Gothel2013-07-191-2/+2
|
* scripts runtests ..Sven Gothel2013-06-211-3/+3
|
* Bug 758: Fix scripts and ant build files to work w/ Java7 (default now) ↵Sven Gothel2013-06-201-2/+2
| | | | producing Java6 bytecode ; Apply JAR Manifest tags: Sealed, Permissions and Codebase
* Fix Bug 757: Regression of URL to URI conversion (Encoded path not ↵Sven Gothel2013-06-191-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | compatible w/ file scheme. Regression of (Bug 683, Commit b98825eb7cfb61aead4a7dff57471cd2d2c26823). The URI encoded path cannot be read by File I/O (if file scheme), since the latter requests an UTF8/16 name, not an URI encoded name (i.e. %20 for space). The encoded URL is produced if calling 'uri.toURL()' and hence the new 'IOUtil.toURL(URI)' provides a custom conversion recovering the UTF name via 'new File(uri).getPath()'. Tested w/ - synthetic URI/URL coposition (unit test) - manual w/ moving 'build' to 'build öä lala' for gluegen, joal and jogl. +++ Misc.: - 'URI JarUtil.getURIDirname(URI)' -> 'URI IOUtil.getDirname(URI)' ++
* GlueGen (Compile Time): Add 'CStruct' Annotation Processor (APT) to ↵Sven Gothel2013-06-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'gluegen' C Structs on-the-fly (2-pass actually). Convenient annotation processing (APT) hooked to 'javac' (1.6) via gluegen.jar META-INF service provider 'javax.annotation.processing.Processor' -> 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor'. Am implicit APT / JAVAC would be possible, however - to have a proper process the unit test utilizes an explicit 2 pass run: <!-- Annotation Processor Only - First --> <javac destdir="${build_t.java}"> <classpath refid="junit.compile.classpath"/> <compilerarg value="-proc:only"/> <compilerarg value="-J-Djogamp.gluegen.structgen.debug"/> <compilerarg value="-J-Djogamp.gluegen.structgen.output=${build_t.gen}/classes"/> <src path="${test.base.dir}/com/jogamp/gluegen/test/junit/structgen"/> </javac> <!-- Javac Only - Second --> <javac destdir="${build_t.java}"> <classpath refid="junit.compile.classpath"/> <compilerarg value="-proc:none"/> <src path="${test.base.dir}"/> <src path="${build_t.gen}" /> </javac> Original code from Michael Bien's 'superglue' git://github.com/mbien/superglue.git, finally merged to GlueGen (as once intended). Note: The APT javac pass requires to use 'gluegen.jar' instead of 'gluegen-rt.jar' ! The 2-pass process also alows using the runtime gluegen-rt.jar and hence ensures clean namespace check at compilation.
* Bug 752: Review Code Vulnerabilities (Permission Checks of new exposed code ↵Sven Gothel2013-06-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and privileged access) This review focuses on how we perform permission checks, or better - do we circumvent some assuming full privileges ? Some native methods do need extra permission validation, i.e. loading native libraries. Further more AccessController.doPrivileged(..) shall not cover generic code exposing a critical feature to the user. Further more .. we should rely on the SecuritManager, i.e. AccessControlContext's 'checkPermission(Permission)' code to comply w/ fine grained permission access. It is also possible to have full permission w/o having any certificates (-> policy file). +++ We remove implicit AccessController.doPrivileged(..) from within our trusted code for generic methods, like Property access, temp. files. +++ SecurityUtil: - Remove 'getCommonAccessControlContext(Class<?> clz)', which returned a local AccessControlContext for later restriction if the passed class contains all certificates as the 'trusted' GlueGen class has. - Simply expose convenient permission check methods relying on SecurityManager / AccessControlContext. PropertyAccess: - 'protected static void addTrustedPrefix(..)' requires AllPermissions if SecurityManager is installed. - Remove implicit doPrivileged(..) triggered by passed AccessControlContext instance, only leave it for trusted prefixes. IOUtil: - Remove all doPrivileged(..) - Elevation shall be performed by caller. DynamicLinker: - 'public long openLibraryLocal(..)' and 'public long openLibraryGlobal(..)' may throw SecurityException, if a SecurityManager is installed and the dyn. link permission is not granted in the calling code. Implemented in their respective Unix, OSX and Windows manifestation. Caller has to elevate privileges via 'doPrivileged(..) {}' ! +++ Tests: - Property access - File access - Native library loading Manual Applet test (unsigned, but w/ SecurityManager and policy file): > gluegen/test/applet Applet has been tested w/ signed JAR w/ Firefox and Java7 on GNU/Linux as well. Manual Application test (unsigned, but w/ SecurityManager and policy file): com.jogamp.junit.sec.TestSecIOUtil01 - Run w/ SecurityManager and policy file: - gluegen/scripts/runtest-secmgr.sh - Run w/o SecurityManager: - gluegen/scripts/runtest.sh
* Fix Bug 683 part1: IOUtil, JarUtil, TempJarCache, .. uses URI instead of URL ↵Sven Gothel2013-06-091-2/+2
| | | | to remove DNS Lookups etc ..
* Enhance VersionNumber*: Use only RegExp and cache default (no wrapped ↵Sven Gothel2013-05-311-3/+3
| | | | whitespace tokenizer); String match: Store end-of-match and flag defined components.
* Modify linux-arm scripts for new toolchain (crosstools-ng) ; ↵Sven Gothel2013-04-231-3/+3
| | | | gluegen-cpptasks-linux-armv6hf.xml: Enable cc-arg '-mfloat-abi=hard' ; Add script make*all.sh
* Bug 715: Adding unit test w/ 'intArrayCopy(int *dest, int *src, int num)' to ↵Sven Gothel2013-04-131-2/+2
| | | | | | | | | | | | test array offset working correct. The 'carray' pointer returned from GetPrimitiveArrayCritical(..) is moved about the array offset and used in ReleasePrimitiveArrayCritical(..) to release the pinpointed memory. Even though this 'is' a bug by violating the _sparse_ specification, Hotspot impl. doesn't use the value at all (NOP) and hence this code didn't produce an error since .. (Same w/ Dalvik). A followup commit will fix this issue.
* Bug 588: Adding jogamp.version property, i.e. 2.0.2-rc-<TIMESTAMP> used for ↵Sven Gothel2013-03-281-2/+2
| | | | | | | | | | | | Manifest ; Common jogamp_int_version for Android. Until 2.0.2 gets released, the version string is 2.0.2-rc-<TIMESTAMP> and used in the Manifest for IMPLEMENTATION_VERSION. The previous build version name of IMPLEMENTATION_VERSION goes into the new tag IMPLEMENTATION_BUILD. Further more, we use a common jogamp_int_version for Android, to make life more easy.
* Fix intptr_t*, uintptr_t*, ptrdiff_t* and size_t* mapping, map them to ↵Sven Gothel2013-03-201-2/+2
| | | | | | PointerBuffer, since referenced memory-size is arch dependent Added extensive PointerBuffer unit tests w/ new mapping in generated test class.
* Fix Long*HashMap impl. of IntIntHashMap: Better 64bit hash value, using new ↵Sven Gothel2013-03-121-3/+3
| | | | | | HashUtil. Introduce markup: /*keyHash*/(.*)/*keyHash*/ allowing Long*HashMap to inject hash function for 64bit value.
* Unit Tests: OSX/Java7 w/o 32bit tests ; Reliable Test1p*JavaEmitter JNI ↵Sven Gothel2013-02-281-2/+2
| | | | | | | | | | | | | | binding initialization - OSX/Java7 w/o 32bit tests OSX/Java7 has no 32bit JVM, disable d32 tests for such, using property 'use.macosx32' - Reliable Test1p*JavaEmitter JNI binding initialization Load libs and init JNI binding statically w/ @BeforeClass, since OSX/Java7 for some reason gets confused (?) w/ init sequence. This is no issue for JOGL etc .. as far we have observed.
* Bug 681: Add Elf Parsing for other OS than Linux, if ARM and !ANDROID using ↵Sven Gothel2013-02-091-2/+4
| | | | | | | | /proc/self/exe (Linux) or a found java/jvm native lib. - PlatformPropsImpl.queryABITypeImpl: Check Elf Header for ARM + !ANDROID (i.e. add other OS than Linux, use native java/jmv lib) - NativeLibrary.enumerateLibraryPaths: Add 'sun.boot.library.path' to enumeration! - TestElfReader01: Add test for finding java/jvm native lib and parse it
* Bug 681: Use ELF Header + ARM EABI Section Parsing in PlatformPropsImpl to ↵Sven Gothel2013-02-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to distinguish ARM soft-float/hard-float (part-2) + /** + * Returns the {@link ABIType} of the current platform using given {@link CPUType cpuType} + * and {@link OSType osType} as a hint. + * <p> + * Note the following queries are performed: + * <ul> + * <li> not {@link CPUFamily#ARM} -> {@link ABIType#GENERIC_ABI} </li> + * <li> else + * <ul> + * <li> not {@link OSType#LINUX} -> {@link ABIType#EABI_GNU_ARMEL} </li> + * <li> else + * <ul> + * <li> Elf ARM Tags -> {@link ABIType#EABI_GNU_ARMEL}, {@link ABIType#EABI_GNU_ARMHF} </li> + * </ul></li> + * </ul></li> + * </ul> + * </p> + * <p> + * Elf ARM Tags are read using {@link ElfHeader}, .. and {@link SectionArmAttributes#abiVFPArgsAcceptsVFPVariant(byte)}. + * </p> + * + * @param cpuType + * @param osType + * @return + */ + private static final ABIType queryABITypeImpl(CPUType cpuType, OSType osType) {
* Bug 681: Add Basic ELF Header + ARM EABI Section Parsing, allowing to ↵Sven Gothel2013-02-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | distinguish ARM soft-float/hard-float (part-1) https://jogamp.org/bugzilla/show_bug.cgi?id=681 + * References: + * <ul> + * <li>http://linux.die.net/man/5/elf</li> + * <li>http://www.sco.com/developers/gabi/latest/contents.html</li> + * <li>http://infocenter.arm.com/ + * <ul> + * <li>ARM IHI 0044E, current through ABI release 2.09</li> + * <li>ARM IHI 0045D, current through ABI release 2.09</li> + * </ul></li> Added self contained jogamp.common.os.elf package w/ entry point class ElfHeader to read a RandomAccessFile and parse it as an ELF file. ELF Parsing completness: - Header: OK - SectionHeader: OK - Section Type SHT_ARM_ATTRIBUTES: OK - Will be read into SectionArmAttributes - Used to distinguisgh soft/hard VFP float Tested manually on: - Linux intel 32bit / 64bit, arm soft-float and hard-float
* GlueGen: NativeLibrary Fix, JNILibLoaderBase EnhancementSven Gothel2013-01-301-3/+5
| | | | | | | | | | | | | | | | | | | - NativeLibrary Fix - enumerateLibraryPaths(..): - Properly iterate through all prefix _and_ suffix. - Make public for JNILibLoaderBase.loadLibraryInternal(..) - isValidNativeLibraryName(..): - Stop iterating through prefix, if previously found but suffix doesn't match. - JNILibLoaderBase.loadLibraryInternal(..) Enhancement - Mark customLibLoader FIXME: remove (we will get rid of jnlp.launcher.class) - If System.load(TempJarCache) and System.loadLibrary(plainLibName) fails, use NativeLibrary.enumerateLibraryPaths() w/ System.load(..) as last resort. Tested on Linux x86_64 Java6 and OSX Java7 manually, no regressions expected.
* Modified Java 1.5 Buffers patch 2b7d1b1d25cb2cd73311ec9159b465f0391bf5e0 - ↵Sven Gothel2013-01-191-1/+1
| | | | | | | | | | | | | | May break GCJ/ECJ .. needs to be revised. - Adding JAVA_6 in PlatformPropsImpl - Buffers.isDirect() chooses fast-path iff JAVA_6, otherwise using reflection (GCJ/ECJ) - Adding JAVA_6 info in VersionUtil - API doc: Refine JAVA_SE and JAVA_6 spec. TODO: In case GCJ etc is unable to compile the JAVA_6 code even though it uses a static condition (probably not), We have to wrap isStatic in an own class, one for JAVA_6 and one for <= 1.5. This will be a good exercise for further issues we may have w/ Java <= 1.5.
* test scriptSven Gothel2013-01-181-2/+2
|
* Add com.jogamp.common.util.PrimitiveStack (FloatStack and IntegerStack), a ↵Sven Gothel2012-12-301-1/+3
| | | | | | | | | | | | simple primitive stack implementation. Currently only FILO put/get operations are implemented using either primitive arrays as I/O itself or <Type>Buffer. Unit tests are included.. Note: Only FloatStack is implemented in a manual, where others (IntegerStack) is derived (generated) from it. Same goes w/ unit tests.
* Fix VersionNumber: Non digits cut off pattern was '\D.*' and cut off digits ↵Sven Gothel2012-10-241-1/+2
| | | | | | | | | | | | | | | | | | | in case leading non digits appear. '\D.*' matches a leading non-digit and then any character. First the string is tokenized by delim: "OpenGL ES GLSL ES 1.0.16" -> "OpenGL ES GLSL ES 1", "0", "16" Enhance pattern as follows and access collected group if matching: // group1: \D* == leading non digits, optional // group2: \d* == digits // group3: .* == any pending chars, optional final java.util.regex.Pattern nonDigitsCutOff = java.util.regex.Pattern.compile("(\\D*)(\\d*)(.*)"); Reorganized storage from atomic values to int[3] array, allowing simple pattern matching loop. Added unit test.
* Buffers: Add normalized put methods, i.e. incl. value range conversion; New ↵Sven Gothel2012-10-171-1/+2
| | | | util. ValueConv for primitive type value conversion
* SingletonInstanceServerSocket: serverSocket.setReuseAddress(true); // reuse ↵Sven Gothel2012-10-041-2/+1
| | | | same port w/ subsequent instance, i.e. overcome TO state when JVM crashed
* SingletonInstanceServerSocket: Add another (manual) unit tests for timeouts.Sven Gothel2012-09-211-5/+5
|
* SingletonInstanceServerSocket: Add kill @ JVM Shutdown _and_ if normal ↵Sven Gothel2012-09-211-1/+3
| | | | unlock fails ; Added unit tests.