Skip to content

Commit

Permalink
Squashed 'src/univalue/' changes from 98fadc0909..a44caf65fe
Browse files Browse the repository at this point in the history
a44caf65fe Merge bitcoin-core/univalue-subtree#28: Import fixes for sanitizer reported issues
135254331e Import fixes for sanitizer reported issues
d5fb86940e refactor: use c++11 range based for loop in checkObject
ff9c379304 refactor: Use nullptr (c++11) instead of NULL
08a99754d5 build: use ax_cxx_compile_stdcxx.m4 to check for C++11 support
66d3713ce7 Merge bitcoin-core/univalue-subtree#29: ci: travis -> cirrus
808d487292 ci: travis -> cirrus
c390ac375f Merge bitcoin-core/univalue-subtree#19: Split sources for easier buildsystem integration
4a5b0a1c65 build: Move source entries out to sources.mk
6c7d94b33c build: cleanup wonky gen usage
a222637c6d Merge ElementsProject#23: Merge changes from jgarzik/univalue@1ae6a23
f77d0f718d Merge commit '1ae6a231a0169938eb3972c1d48dd17cba5947e1' into HEAD
1ae6a231a0 Merge pull request ElementsProject#57 from MarcoFalke/test_fix
92bdd11f0b univalue_write: remove unneeded sstream.h include
ffb621c130 Merge pull request ElementsProject#56 from drodil/remove_sstream_header
f33acf9fe8 Merge commit '7890db9~' into HEAD
66e0adec4d Remove unnecessary sstream header from univalue.h
88967f6586 Version 1.0.4
1dc113dbef Merge pull request ElementsProject#50 from luke-jr/pushKV_bool
72392fb227 [tests] test pushKV for boolean values
c23132bcf4 Pushing boolean value to univalue correctly
81faab26a1 Merge pull request ElementsProject#48 from fwolfst/47-UPDATE_MIT_LINK_TO_HTTPS
b17634ef24 Update URLs to MIT license.
88ab64f6b5 Merge pull request ElementsProject#46 from jasonbcox/master
35ed96da31 Merge pull request ElementsProject#44 from MarcoFalke/Mf1709-univalue-cherrypick-explicit
420c226290 Merge pull request ElementsProject#45 from MarcoFalke/Mf1710-univalue-revert-test

git-subtree-dir: src/univalue
git-subtree-split: a44caf65fe55b9dd8ddb08f04c0f70409efd53b3
  • Loading branch information
fanquake committed Oct 11, 2021
1 parent 2a55a0e commit 9b49ed6
Show file tree
Hide file tree
Showing 16 changed files with 1,369 additions and 376 deletions.
44 changes: 44 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
env:
MAKEJOBS: "-j4"
RUN_TESTS: "true"
BASE_OUTDIR: "$CIRRUS_WORKING_DIR/out_dir_base"
DEBIAN_FRONTEND: "noninteractive"

task:
container:
image: ubuntu:focal
cpu: 1
memory: 1G
greedy: true # https://medium.com/cirruslabs/introducing-greedy-container-instances-29aad06dc2b4

matrix:
- name: "gcc"
env:
CC: "gcc"
CXX: "g++"
APT_PKGS: "gcc"
- name: "clang"
env:
CC: "clang"
CXX: "clang++"
APT_PKGS: "clang"
- name: "mingw"
env:
CC: ""
CXX: ""
UNIVALUE_CONFIG: "--host=x86_64-w64-mingw32"
APT_PKGS: "g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64"
RUN_TESTS: "false"

install_script:
- apt update
- apt install -y pkg-config build-essential libtool autotools-dev automake bsdmainutils
- apt install -y $APT_PKGS
autogen_script:
- ./autogen.sh
configure_script:
- ./configure --cache-file=config.cache --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib $UNIVALUE_CONFIG
make_script:
- make $MAKEJOBS V=1
test_script:
- if [ "$RUN_TESTS" = "true" ]; then make $MAKEJOBS distcheck; fi
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

90 changes: 15 additions & 75 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
include sources.mk
ACLOCAL_AMFLAGS = -I build-aux/m4
.PHONY: gen
.PHONY: gen FORCE
.INTERMEDIATE: $(GENBIN)

include_HEADERS = include/univalue.h
noinst_HEADERS = lib/univalue_escapes.h lib/univalue_utffilter.h
include_HEADERS = $(UNIVALUE_DIST_HEADERS_INT)
noinst_HEADERS = $(UNIVALUE_LIB_HEADERS_INT)

lib_LTLIBRARIES = libunivalue.la

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pc/libunivalue.pc

libunivalue_la_SOURCES = \
lib/univalue.cpp \
lib/univalue_get.cpp \
lib/univalue_read.cpp \
lib/univalue_write.cpp
libunivalue_la_SOURCES = $(UNIVALUE_LIB_SOURCES_INT)

libunivalue_la_LDFLAGS = \
-version-info $(LIBUNIVALUE_CURRENT):$(LIBUNIVALUE_REVISION):$(LIBUNIVALUE_AGE) \
Expand All @@ -30,89 +27,32 @@ $(GENBIN): $(GEN_SRCS)
@echo Building $@
$(AM_V_at)c++ -I$(top_srcdir)/include -o $@ $<

gen: lib/univalue_escapes.h $(GENBIN)
@echo Updating $<
gen: $(GENBIN) FORCE
@echo Updating lib/univalue_escapes.h
$(AM_V_at)$(GENBIN) > lib/univalue_escapes.h

noinst_PROGRAMS = $(TESTS) test/test_json

TEST_DATA_DIR=test

test_unitester_SOURCES = test/unitester.cpp
test_unitester_SOURCES = $(UNIVALUE_TEST_UNITESTER_INT)
test_unitester_LDADD = libunivalue.la
test_unitester_CXXFLAGS = -I$(top_srcdir)/include -DJSON_TEST_SRC=\"$(srcdir)/$(TEST_DATA_DIR)\"
test_unitester_CXXFLAGS = -I$(top_srcdir)/include -DJSON_TEST_SRC=\"$(srcdir)/$(UNIVALUE_TEST_DATA_DIR_INT)\"
test_unitester_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)

test_test_json_SOURCES = test/test_json.cpp
test_test_json_SOURCES = $(UNIVALUE_TEST_JSON_INT)
test_test_json_LDADD = libunivalue.la
test_test_json_CXXFLAGS = -I$(top_srcdir)/include
test_test_json_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)

test_no_nul_SOURCES = test/no_nul.cpp
test_no_nul_SOURCES = $(UNIVALUE_TEST_NO_NUL_INT)
test_no_nul_LDADD = libunivalue.la
test_no_nul_CXXFLAGS = -I$(top_srcdir)/include
test_no_nul_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)

test_object_SOURCES = test/object.cpp
test_object_SOURCES = $(UNIVALUE_TEST_OBJECT_INT)
test_object_LDADD = libunivalue.la
test_object_CXXFLAGS = -I$(top_srcdir)/include
test_object_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)

TEST_FILES = \
$(TEST_DATA_DIR)/fail10.json \
$(TEST_DATA_DIR)/fail11.json \
$(TEST_DATA_DIR)/fail12.json \
$(TEST_DATA_DIR)/fail13.json \
$(TEST_DATA_DIR)/fail14.json \
$(TEST_DATA_DIR)/fail15.json \
$(TEST_DATA_DIR)/fail16.json \
$(TEST_DATA_DIR)/fail17.json \
$(TEST_DATA_DIR)/fail18.json \
$(TEST_DATA_DIR)/fail19.json \
$(TEST_DATA_DIR)/fail1.json \
$(TEST_DATA_DIR)/fail20.json \
$(TEST_DATA_DIR)/fail21.json \
$(TEST_DATA_DIR)/fail22.json \
$(TEST_DATA_DIR)/fail23.json \
$(TEST_DATA_DIR)/fail24.json \
$(TEST_DATA_DIR)/fail25.json \
$(TEST_DATA_DIR)/fail26.json \
$(TEST_DATA_DIR)/fail27.json \
$(TEST_DATA_DIR)/fail28.json \
$(TEST_DATA_DIR)/fail29.json \
$(TEST_DATA_DIR)/fail2.json \
$(TEST_DATA_DIR)/fail30.json \
$(TEST_DATA_DIR)/fail31.json \
$(TEST_DATA_DIR)/fail32.json \
$(TEST_DATA_DIR)/fail33.json \
$(TEST_DATA_DIR)/fail34.json \
$(TEST_DATA_DIR)/fail35.json \
$(TEST_DATA_DIR)/fail36.json \
$(TEST_DATA_DIR)/fail37.json \
$(TEST_DATA_DIR)/fail38.json \
$(TEST_DATA_DIR)/fail39.json \
$(TEST_DATA_DIR)/fail40.json \
$(TEST_DATA_DIR)/fail41.json \
$(TEST_DATA_DIR)/fail42.json \
$(TEST_DATA_DIR)/fail44.json \
$(TEST_DATA_DIR)/fail45.json \
$(TEST_DATA_DIR)/fail3.json \
$(TEST_DATA_DIR)/fail4.json \
$(TEST_DATA_DIR)/fail5.json \
$(TEST_DATA_DIR)/fail6.json \
$(TEST_DATA_DIR)/fail7.json \
$(TEST_DATA_DIR)/fail8.json \
$(TEST_DATA_DIR)/fail9.json \
$(TEST_DATA_DIR)/pass1.json \
$(TEST_DATA_DIR)/pass2.json \
$(TEST_DATA_DIR)/pass3.json \
$(TEST_DATA_DIR)/pass4.json \
$(TEST_DATA_DIR)/round1.json \
$(TEST_DATA_DIR)/round2.json \
$(TEST_DATA_DIR)/round3.json \
$(TEST_DATA_DIR)/round4.json \
$(TEST_DATA_DIR)/round5.json \
$(TEST_DATA_DIR)/round6.json \
$(TEST_DATA_DIR)/round7.json

EXTRA_DIST=$(TEST_FILES) $(GEN_SRCS)
TEST_FILES = $(UNIVALUE_TEST_FILES_INT)

EXTRA_DIST=$(UNIVALUE_TEST_FILES_INT) $(GEN_SRCS)
Loading

0 comments on commit 9b49ed6

Please sign in to comment.