Comments (3)
Doing 'make check' for base already runs the base testsuite on the uninstalled library, which is usually what you want.
So what is the nature of the issue/problem?
Is it that you want testcases, once built, to be executable directly/externally and still use the uninstalled library without having to reproduce the LD_LIBRARY_PATH 'magic' that the test suite does for you when you run the tests normally?
Or is it that you want to have gnustep-tests, when run for the base testsuite, think it should build and run the tests using the library in ../../Source/obj and headers in ../../Headers if they exist?
I looked up -rpath online and found that the order of precedence for library search is:
- LD_LIBRARY_PATH
- -rpath
- system default paths
I added a couple of lines to build the testcases with -rpath as it seems harmless, but I'm not at all sure it actually resolves either of those two issues most of the time since LD_LIBRARY_PATH takes precedence, though it clearly fixes them in the case you are building/testing a library for the first time (ie there is no installed version).
So if you run testcases using gnustep-tests or even directly in a gnustep environment, I expect the LD_LIBRARY_PATH will cause the installed version to be used (if it exists), but the uninstalled version (pointed to by -rpath) to be used otherwise.
On the other hand, if you run them using 'make check' the normal code to set LD_LIBRARY_PATH to point to the uninstalled library for the duration of the tests will still be used.
from libs-base.
Doing 'make check' for base already runs the base testsuite on the uninstalled library, which is usually what you want.
Does it? I encountered this problem running make check
and having everything fail.
Is it that you want testcases, once built, to be executable directly/externally and still use the uninstalled library without having to reproduce the LD_LIBRARY_PATH 'magic' that the test suite does for you when you run the tests normally?
This is pretty much a minimum if I'm trying to debug a failing test, yes.
from libs-base.
Does it?
Yes ... try 'make messages=yes check' to see how it's setting up the environment.
eg.
$ cd Tests
[richard@centos-linux Tests]$ make check
This is gnustep-make 2.7.0. Type 'gmake print-gnustep-make-help' for help.
Running in gnustep-make version 2 strict mode.
(
GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES="/home/richard/git/libs-base/base.make";
ADDITIONAL_INCLUDE_DIRS="-I/home/richard/git/libs-base/Headers -I/home/richard/git/libs-base/Source/.";
ADDITIONAL_LIB_DIRS="-L/home/richard/git/libs-base/Source/./obj";
ADDITIONAL_LDFLAGS="-Wl,-rpath,/home/richard/git/libs-base/Source/./obj";
LD_LIBRARY_PATH="/home/richard/git/libs-base/Source/./obj:/home/richard/GNUstep/Library/Libraries:/home/richard/gnustep-ng/Local/Library/Libraries:/home/richard/gnustep-ng/System/Library/Libraries";
PATH="/home/richard/git/libs-base/Tools/./obj:/home/richard/GNUstep/Tools:/home/richard/gnustep-ng/Local/Tools:/home/richard/gnustep-ng/System/Tools:/usr/lib64/qt-3.3/bin:/home/richard/perl5/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/richard/bin";
export GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES;
export ADDITIONAL_INCLUDE_DIRS;
export ADDITIONAL_LDFLAGS;
export ADDITIONAL_LIB_DIRS;
export LD_LIBRARY_PATH;
export PATH;
if [ "" = "" ]; then
gnustep-tests base;
else
gnustep-tests --debug base;
fi;
)
--- Running tests in base ---
--- Running tests in base/coding ---
--- Running tests in base/Functions ---
...
I encountered this problem running make check and having everything fail.
Then it would be good to know what made it fail, so it could be dealt with.
I use this on an almost daily basis.
This is pretty much a minimum if I'm trying to debug a failing test, yes.
I'm used to having my LD_LIBRARY_PATH set up by scripts for each different environment I'm working in, but I can see how, if you don't automate that sort of thing, it could be a pain.
One option if you don't want to alter your normal shell is to put the LD_LIBRARY_PATH setup into TestInfo for the directory your testcases are in, then you can use gnustep-tests --debug to debug any failing testcases.
gnustep-make does something similar for libraries and frameworks using the foo_TEST_DIR option to integrate regression tests for the library/framework named 'foo'. In this case 'make check' generates a 'make-check.env' file which provides the environment for gnustep-tests to run testcases in.
from libs-base.
Related Issues (20)
- -[NSNotificationCenter addObserverForName:object:queue:usingBlock:] has a leak HOT 1
- Writing file atomically vs. not leads to different permissions HOT 8
- libasan detects leaks HOT 5
- NSJSONSerialization returns nil for certain strings with Unicode sequences HOT 2
- The second NSOperation added to an NSOperationQueue sometimes doesn't run until first operation is finished HOT 1
- Spurious NSURL test failures on Windows x64 MSVC HOT 7
- Exception when initializing NSLocale with dash-separated identifier HOT 2
- Deadlock and Increasing Memory Leak in NSURLConnection/test02 on Windows on ARM64 HOT 2
- Deadlock in NSUserDefaults HOT 3
- -[NSJSONSerialization JSONObjectWithStream:...] has a leak HOT 1
- NSRunLoop + dispatch_main_queue = 100% CPU --- SOLVED HOT 11
- Uninitialized GSNotificationObserverClass can cause a crash HOT 2
- Build error HOT 1
- subClass of NSHashTable does not call allocWithZone HOT 15
- NSNotificationCenter removeObserver:name:object: is causing crash HOT 12
- Failing to build on Rocky 8 HOT 3
- "Uncaught exception NSLockException, reason: failed to unlock mutex" when the first Foundation function called is NSSearchPathForDirectoriesInDomains HOT 1
- Inconsistent behavior of rand() between Linux/Windows on new threads after srand() on previous/main thread HOT 2
- dispatch_data_t <=> NSData toll-free bridging does not work
- Applying clang-format to the entire repository? HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libs-base.