Skip to content
Snippets Groups Projects
Select Git revision
  • fe245d052909178b92b54441e58ee67e8cd287cb
  • master default protected
  • nightly_master
  • online_much_readconf_cleanup protected
  • online_mvd_readconf_cleanup protected
  • jul25_patches
  • cleanup_rich_v25a
  • jul24_patches
  • nov23_patches
  • DC_2404
  • nighly_master
  • DC_Jan24
  • DC_Nov23
  • DC_Oct23
  • feb23_patches
  • L1Algo-dev9
  • dec21_patches protected
  • apr21_patches protected
  • dev_2025_45
  • dev_2025_44
  • dev_2025_43
  • dev_2025_42
  • dev_2025_41
  • dev_2025_40
  • dev_2025_39
  • dev_2025_38
  • dev_2025_37
  • dev_2025_36
  • dev_2025_35
  • dev_2025_34
  • dev_2025_33
  • dev_2025_32
  • dev_2025_31
  • dev_2025_30
  • RC_jul25
  • dev_2025_29
  • dev_2025_28
  • dev_2025_27
38 results

checklibs.sh

Blame
  • Florian Uhlig's avatar
    Administrator authored and Florian Uhlig committed
    With the latest change not all libraries were found any longer such
    that not all libraries were tested.
    The outcome of the test was such not reliable.
    099ec8bc
    History
    checklibs.sh 1.04 KiB
    #!/bin/bash
    # Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    # SPDX-License-Identifier: GPL-3.0-only
    # First commited by Florian Uhlig
    
    # check if the libraries have the proper dependencies
    # load a single library in root and check the return value
    
    # Allow to run the script in th test suite without parameters
    # or from the command line passing the proper parameters
    SCRIPTDIR=${1:-$VMCWORKDIR/scripts}
    LIBDIR=${2:-../lib}
    
    # find all libs
    # libraries are real files with the extensions .so and for macosx .dylib
    all_libs=$(find $LIBDIR -type f -o -type l | grep -e \.dylib$ -e \.so$)
    
    tmpfile=$(mktemp)
    
    ok=true
    for lib in $all_libs; do
      echo "Loading the library $lib"
      root -l -q -b $SCRIPTDIR/loadlib.C\(\"$lib\"\) &> $tmpfile
      retval=$?
      if [[ retval -ne 0 ]]; then
        echo ""
        echo "Problem loading the library $lib"
        cat $tmpfile
        echo ""
        okay=false
      fi
    done
    
    rm $tmpfile
    
    if [[ "$okay" = "false" ]]; then
      echo ""
      echo "Not all libraries could be loaded"
      echo "Test failed"
      exit 1
    else
      exit 0
    fi