verify.sh 531 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. set -u
  3. echo -n "Building library: "
  4. yag make -DBUILD_POSTGRES_ONLY || exit $?
  5. echo -n "Checking static variables: "
  6. data=$(objdump libyql-parser-pg_wrapper.a -t | grep -E "\.data\.|\.bss\." | \
  7. grep -v -E "\.data\.rel\.ro\." | \
  8. grep -v -E "pg_comp_crc32c|pg_popcount32|pg_popcount64" | \
  9. grep -v -E "BlockSig|StartupBlockSig|UnBlockSig"
  10. )
  11. if [ ${#data} -eq 0 ]; then
  12. echo "OK";
  13. exit 0;
  14. fi
  15. cnt=$(echo "$data" | wc -l)
  16. echo "***GOT $cnt UNEXPECTED SYMBOLS***"
  17. echo "$data"
  18. exit 1;