From aaf5658a2f0e1a371dc5257feeda7f3c4e304651 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 26 Nov 2013 14:48:52 +0200 Subject: We never ever want anything OpenCL-related in the sc_ucalc unit test So unset any SC_BACKGROUND_COMPILATION environment variable to avoid that mixing up things when running this test. (It doesn't in a "clean" build, but in a build where you temporarily have made the SC_BACKGROUND_COMPILATION thing actually work in the sc_opencl_test unit test (by bypassing the weird "Is OpenCL enabled? Yes! No! Yes!" dance there), it does.) Loading the scopencl library will load also the sc library, which causes lots of confusion, as this unit test library itself includes all the object files from the sc library. (For IMHO questionable micro-optimisation reasons.) Another day wasted thanks to not understanding what undoubtedly are clever and elegant tricks. Change-Id: I203b6dae7d9b52787ac2d57180be87a61626af6c --- sc/qa/unit/ucalc.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sc') diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 97a8d70f7932..84633bca2be0 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -138,6 +138,8 @@ ScDocShell& Test::getDocShell() void Test::setUp() { + osl_clearEnvironment(OUString("SC_BACKGROUND_COMPILATION").pData); + BootstrapFixture::setUp(); ScDLL::Init(); -- cgit