Branch libreoffice-5-0-4
[LibreOffice.git] / solenv / bin / unittest-failed.sh
blob0d11b2afc717b9216060dcb422859110fa5cbb8a
1 #!/bin/sh
2 # -*- Mode: sh; tab-width: 4; indent-tabs-mode: t -*-
4 # This file is part of the LibreOffice project.
6 # This Source Code Form is subject to the terms of the Mozilla Public
7 # License, v. 2.0. If a copy of the MPL was not distributed with this
8 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 # This file incorporates work covered by the following license notice:
12 # Licensed to the Apache Software Foundation (ASF) under one or more
13 # contributor license agreements. See the NOTICE file distributed
14 # with this work for additional information regarding copyright
15 # ownership. The ASF licenses this file to you under the Apache
16 # License, Version 2.0 (the "License"); you may not use this file
17 # except in compliance with the License. You may obtain a copy of
18 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 DEBUGGING=
22 if [ "$3" = "WNT" ]; then
23 DEBUGGING='
24 export CPPUNITTRACE="\"[full path to devenv.exe]\" /debugexe" # for interactive debugging in Visual Studio
25 export CPPUNITTRACE="drmemory -free_max_frames 20" # for memory checking (install Dr.Memory first, and put it to your PATH)
27 elif [ "$3" = "MACOSX" ]; then
28 DEBUGGING='
29 export CPPUNITTRACE="lldb --" # for interactive debugging on OS X
30 export VALGRIND=memcheck # for memory checking
32 else
33 DEBUGGING='
34 export DEBUGCPPUNIT=TRUE # for exception catching
35 export CPPUNITTRACE="gdb --args" # for interactive debugging on Linux
36 export VALGRIND=memcheck # for memory checking
40 # print the actual error message
41 cat << EOF
43 Error: a unit test failed, please do one of:
44 $DEBUGGING
45 and retry using: make $1Test_$2
47 EOF
49 exit 1
51 # vim: set et sw=4: