diff options
author | Michel Thomas <michelphoenix98@gmail.com> | 2020-02-11 21:34:57 +0530 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-02-12 09:14:03 +0100 |
commit | 8d8f62852a64bd2fcae47a9499406d9167aebf83 (patch) | |
tree | fb350383c96c6cb1e70a334c2aed3ea34d284218 /configure.ac | |
parent | a7d1fed24557b203acb5016a98af26f4ef24d27a (diff) |
tdf#84553 Correctly handle failures while getting a WMI Object.
The output before this patch : checking for active Antivirus software... C:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\antivirusDetection.vbs(1, 1) (null): 0x8004100E
found
The link for which is : https://ci.libreoffice.org/job/gerrit_windows/57035/consoleFull
Change-Id: I714442739a8daf132e95b9f6a750aa7abab3561e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88465
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index 615c9f2df8ee..4713f269ccbf 100644 --- a/configure.ac +++ b/configure.ac @@ -12980,24 +12980,28 @@ dnl =================================================================== if test $_os = WINNT ; then AC_MSG_CHECKING([for active Antivirus software]) ANTIVIRUS_LIST=`cscript.exe //Nologo $SRC_ROOT/antivirusDetection.vbs` - if [ [ "$ANTIVIRUS_LIST" != "NOT_FOUND" ] ]; then - AC_MSG_RESULT([found]) - EICAR_STRING='X5O!P%@AP@<:@4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*' - echo $EICAR_STRING > $SRC_ROOT/eicar - EICAR_TEMP_FILE_CONTENTS=`cat $SRC_ROOT/eicar` - rm $SRC_ROOT/eicar - if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then - AC_MSG_ERROR([Exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST]) - fi - echo $EICAR_STRING > $BUILDDIR/eicar - EICAR_TEMP_FILE_CONTENTS=`cat $BUILDDIR/eicar` - rm $BUILDDIR/eicar - if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then - AC_MSG_ERROR([Exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST]) - fi - add_warning "To speed up builds and avoid failures in unit tests, it is highly recommended that you exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST" - else - AC_MSG_RESULT([not found]) + if [ [ "$ANTIVIRUS_LIST" != "NULL" ] ]; then + if [ [ "$ANTIVIRUS_LIST" != "NOT_FOUND" ] ]; then + AC_MSG_RESULT([found]) + EICAR_STRING='X5O!P%@AP@<:@4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*' + echo $EICAR_STRING > $SRC_ROOT/eicar + EICAR_TEMP_FILE_CONTENTS=`cat $SRC_ROOT/eicar` + rm $SRC_ROOT/eicar + if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then + AC_MSG_ERROR([Exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST]) + fi + echo $EICAR_STRING > $BUILDDIR/eicar + EICAR_TEMP_FILE_CONTENTS=`cat $BUILDDIR/eicar` + rm $BUILDDIR/eicar + if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then + AC_MSG_ERROR([Exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST]) + fi + add_warning "To speed up builds and avoid failures in unit tests, it is highly recommended that you exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST" + else + AC_MSG_RESULT([not found]) + fi + else + AC_MSG_RESULT([n/a]) fi fi |