Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
include:
- os: ubuntu-latest
name: Linux
- os: macos-15
name: macOS 15 arm64

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!!

- os: macos-26
name: macOS 26 arm64
name: ${{ matrix.name }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ gcovr-output/
gcov-data/
/bw-output/
/.scannerwork/
coverage-html*/**

## Generic generated file patterns
*~
Expand Down
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ addons:
- uuid-dev
- libcurl4-openssl-dev
- libcppunit-dev
- gcovr
# - gcovr Later we force version 8.2. Using apt install 4.2 which has bugs. jhrg 7/16/26
- libfl-dev # needed for focal, but not xenial. jhrg 1/18/24
- libtool-bin
- ccache
Expand Down Expand Up @@ -145,13 +145,20 @@ jobs:
- stage: scan
name: "scan"
env: CACHE_NAME=scan
TESTSUITEFLAGS=-j1
script:
- export LIBDAP_BUILD=sonar
- export SONAR_TOKEN=$SONAR_LOGIN
- autoreconf --force --install --verbose
- ./configure --disable-dependency-tracking --prefix=$prefix --enable-developer --enable-coverage
- build-wrapper-linux-x86-64 --out-dir bw-output make -j$BUILD_PROCS
- make check -j$BUILD_PROCS
# Force version 8.2 to work around an issue with the version bound to focal.
# Using apt (the addons section at line 42) installs version 4.2 which has bugs
# that break SonarScan. jhrg 7/16/26
- pip3 install --user gcovr==8.2
- export PATH="$HOME/.local/bin:$PATH"
- gcovr --version
- gcovr --config gcovr.config --sonarqube coverage.xml
- sonar-scanner
# The scanner waits for the quality gate because sonar.qualitygate.wait=true is set
Expand Down
93 changes: 80 additions & 13 deletions conf/config.rpath
Original file line number Diff line number Diff line change
@@ -1,30 +1,97 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
# run time search path of shared libraries in a binary (executable or
# shared library).
#
# Copyright 1996-2017 Free Software Foundation, Inc.
# Copyright 1996-2024 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.

# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.

# func_usage
# outputs to stdout the --help usage message.
func_usage ()
{
echo "\
Usage: config.rpath [OPTION] HOST

Prints shell variable assignments that describe how to hardcode a directory
for the lookup of shared libraries into a binary (executable or shared library).

The first argument passed to this file is the canonical host specification,
CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
or
CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM

The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
should be set by the caller.

The set of defined variables is at the end of this script.

Options:
--help print this help and exit
--version print version information and exit

Send patches and bug reports to <bug-gnulib@gnu.org>."
}

# func_version
# outputs to stdout the --version message.
func_version ()
{
echo "config.rpath (GNU gnulib, module havelib)"
echo "Copyright (C) 2024 Free Software Foundation, Inc.
License: All-Permissive.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law."
echo
printf 'Written by %s.\n' "Bruno Haible"
}

# func_fatal_error message
# outputs to stderr a fatal error message, and terminates the program.
func_fatal_error ()
{
echo "config.rpath: *** $1" 1>&2
echo "config.rpath: *** Stop." 1>&2
exit 1
}

# Command-line option processing.
while test $# -gt 0; do
case "$1" in
--help | --hel | --he | --h )
func_usage
exit 0 ;;
--version | --versio | --versi | --vers | --ver | --ve | --v )
func_version
exit 0 ;;
-- ) # Stop option processing
shift; break ;;
-* )
func_fatal_error "unrecognized option: $1"
;;
* )
break ;;
esac
done

if test $# -gt 1; then
func_fatal_error "too many arguments"
fi
if test $# -lt 1; then
func_fatal_error "too few arguments"
fi

# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
Expand Down Expand Up @@ -371,7 +438,7 @@ else
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | dragonfly*)
freebsd* | dragonfly* | midnightbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
Expand Down Expand Up @@ -547,7 +614,7 @@ case "$host_os" in
freebsd[23].*)
library_names_spec='$libname$shrext$versuffix'
;;
freebsd* | dragonfly*)
freebsd* | dragonfly* | midnightbsd*)
library_names_spec='$libname$shrext'
;;
gnu*)
Expand Down
1 change: 1 addition & 0 deletions gcovr.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ exclude-throw-branches = yes
# sort = uncovered-percent

# exclude coverage for the test code
# match/sync these with sonar-project.properties. jhrg 7/16/26
exclude-directories = (.+/)?unit-tests
exclude-directories = (.+/)?tests
exclude-directories = (.+/)?gl
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ sonar.projectVersion=1.0

sonar.sources=.
sonar.exclusions=retired/**,debian/**,gl/**,VCPP/**,win32/**
# Be sure to sync changes to gcovr.config with these exclusions. jhrg 7/16/26
sonar.coverage.exclusions=unit-tests/**,tests/**,conf/**,gl/**,retired/**
# TODO Use this? jhrg 5/8/25 sonar.tests=

sonar.cfamily.compile-commands=bw-output/compile_commands.json
Expand Down
5 changes: 1 addition & 4 deletions unit-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set(TESTS_DAP_ONLY
D4AttributesTest.cc D4EnumTest.cc chunked_iostream_test.cc D4AsyncDocTest.cc
DMRTest.cc DmrRoundTripTest.cc DmrToDap2Test.cc D4FilterClauseTest.cc
IsDap4ProjectedTest.cc MarshallerFutureTest.cc TempFileTest.cc
DAPCache3Test.cc D4StreamRoundTripTest.cc ConstraintEvaluatorTest.cc MarshallerThreadTest.cc
D4StreamRoundTripTest.cc ConstraintEvaluatorTest.cc MarshallerThreadTest.cc
BaseTypeTest.cc
)

Expand Down Expand Up @@ -74,9 +74,6 @@ foreach(src ${TESTS_DAP_ONLY})
build_test(${tgt} ${src})
endforeach()

# DAPCache3 is not part of libdap, so compile its implementation into the test.
target_sources(DAPCache3Test PRIVATE ${CMAKE_SOURCE_DIR}/DAPCache3.cc)

foreach(src ${TESTS_DAPCLIENT})
get_filename_component(tgt ${src} NAME_WE)
build_test(${tgt} ${src})
Expand Down
4 changes: 2 additions & 2 deletions unit-tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ UNIT_TESTS = marshT arrayT attrTableT structT sequenceT ddsT dasT \
Int32Test UInt32Test Int64Test UInt64Test Float32Test Float64Test \
D4BaseTypeFactoryTest BaseTypeFactoryTest util_mitTest ErrorTest \
MarshallerFutureTest ConstraintEvaluatorTest MarshallerThreadTest \
DAPCache3Test BaseTypeTest SegmentReadWriteT
BaseTypeTest SegmentReadWriteT

# Unit tests for DAP4-only code. jhrg 2/4/22
UNIT_TESTS += D4MarshallerTest D4UnMarshallerTest D4DimensionsTest \
Expand Down Expand Up @@ -185,7 +185,7 @@ DDXParserTest_CPPFLAGS = $(AM_CPPFLAGS) $(XML2_CFLAGS)

generalUtilTest_SOURCES = generalUtilTest.cc

DAPCache3Test_SOURCES = DAPCache3Test.cc ../DAPCache3.cc ../DAPCache3.h
# DAPCache3Test_SOURCES = DAPCache3Test.cc ../DAPCache3.cc ../DAPCache3.h

ConstraintEvaluatorTest_SOURCES = ConstraintEvaluatorTest.cc

Expand Down
Loading