Commit Graph

71 Commits

Author SHA1 Message Date
Jason Rhinelander 5f1bd2f1e4 Drop integration test code.
This code is bitrotting, doesn't compile, and isn't being maintained
anymore.

The integration test suite was an interesting idea, in early Loki days,
but is no longer being maintained and is quite cumbersome to run (for
instance, it is not possible to run it via CI because it depends on
xterm to actually run).  The code to actually run it (in doy-lee's
loki-integration-testing repository) is also a large burden of "janky"
code that isn't worth maintaining.

Remove this from the code; if someone wants to pick it back up in the
future reverting this commit shouldn't be too difficult (though I'd
suggest that a much better approach to integration testing would be to
run different daemons/wallets via rpc commands, as the network-tests do,
rather than trying to feed stdin and parse stdout from running
individual oxends/wallets).
2021-08-19 16:42:15 -03:00
Jason Rhinelander 5878c3f7d6
Remove WARNINGS_AS_ERRORS from top-level Makefile (#1257)
-Werror is really a developer option to try to make code warning-clean,
but it shouldn't be forced on in the top-level Makefile that users are
directed to.
2020-09-16 16:26:29 +10:00
Jason Rhinelander 7964a27b57 Remove contrib/depends
We've never seriously used it, versions in it tend to bitrot, and it's
redundant with the new cmake-based static builds which are easier to
maintain.
2020-06-16 00:02:14 -03:00
Jason Rhinelander 415027c6cd create_archive target: add targets to archive the bin/ build dir
From a cmake build dir (`make` used for simple example; can also be
something else, such as ninja):

    make create_tarxz
    make create_zip

creater a loki-<OS>[-arch]-x.y.z[-dev]-<GITHASH>.tar.xz or .zip.

    make create_archive

decides what to do based on the build type: creates a .zip for a windows
build, a tar.xz for anything else.  (We have been distributing the macOS
binaries as a .zip but that seems unnecessary: I tested on our dev mac
and a .tar.xz offers exactly the same UX as a .zip, but is noticeably
smaller).

From the top-level makefile there is also a new `make
release-full-static-archive` that does a full static build (include all
deps) and builds the archive.
2020-06-15 12:49:33 -03:00
Jason Rhinelander 98d1cab7ed Fix invalid cmake build type release -> Release
Lower-case "release" is not a valid cmake build type (it's "Release"),
so fix it.
2020-06-14 23:43:35 -03:00
Doyle 2ed4ecff27 Merge commit 'ae9583d' into MergeUpstream3 2020-05-27 15:18:14 +10:00
Doyle 1391f35ef0 Merge commit 'dc64fcb8a6c046c6e30665a6217b8fb6ec2471bc' into MergeUpstream3 2020-05-22 11:25:15 +10:00
Jason Rhinelander 5b97ff6e9c cmake modernization
The archaic (i.e. decade old) cmake usage here really got in the way of
trying to properly use newer libraries (like lokimq), so this undertakes
overhauling it considerably to make it much more sane (and significantly
reduce the size).

I left more of the architecture-specific bits in the top-level
CMakeLists.txt intact; most of the efforts here are about properly
loading dependencies, specifying dependencies and avoiding a whole pile
of cmake antipatterns.

This bumps the required cmake version to 3.5, which is what xenial comes
with.

- extensive use of interface libraries to include libraries,
definitions, and include paths

- use Boost::whatever instead of ${Boost_WHATEVER_LIBRARY}.  The
interface targets are (again) much better as they also give you any
needed include or linking flags without needing to worry about them.

- don't list header files when building things.  This has *never* been
correct cmake usage (cmake has always known how to wallet_rpc_headers
the headers that .cpp files include to know about build changes).

- remove the loki_add_library monstrosity; it breaks target names and
makes compiling less efficient because the author couldn't figure out
how to link things together.

- make loki_add_executable take the output filename, and set the output
path to bin/ and install to bin because *every single usage* of
loki_add_executable was immediately followed by setting the output
filename and setting the output path to bin/ and installing to bin.

- move a bunch of crap that is only used in one particular
src/whatever/CMakeLists.txt into that particular CMakeLists.txt instead
of the top level CMakeLists.txt (or src/CMakeLists.txt).

- Remove a bunch of redundant dependencies; most of them look like they
were just copy-and-pasted in, and many more aren't needed (since they
are implied by the PUBLIC linking of other dependencies).

- Removed `die` since it just does a FATAL_ERROR, but adds color (which
is useless since CMake already makes FATAL_ERRORs perfectly visible).

- Change the way LOKI_DAEMON_AND_WALLET_ONLY works to just change the
make targets to daemon and simplewallet rather than changing the build
process (this should make it faster, too, since there are various other
things that will be excluded).
2020-03-06 00:36:57 -04:00
xiphon 2aa80b1d28 build: autodetect MSYS2 install path, support non-standard location 2020-01-13 10:02:18 +00:00
Doyle a9ba55a72a
Fix WARNING_AS_ERROR -> WARNINGS_AS_ERRORS typo (#929) 2019-11-21 10:04:21 +11:00
Doyle aaf4c5a32c Add WARNINGS_AS_ERRORS flag for release builds 2019-09-16 18:02:58 +10:00
moneromooo-monero 11fa442637
Makefile: add a top level debug target for ASAN 2019-09-04 12:11:44 +00:00
Doyle 8bbc87d470 Add more 2019 license updates for Monero 2019-04-12 14:38:30 +10:00
Doyle 550e56ac1e Merge commit 'c88e9921043d7c40f023d24c3a3f39f2e96f8738' into LokiMergeUpstream 2019-04-12 14:17:05 +10:00
Riccardo Spagni 4c91eb23a0
Merge pull request #5061
1f2930ce Update 2019 copyright (binaryFate)
2019-03-17 17:49:30 +02:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
Dusan Klinec 5ea17909ca
device/trezor: debugging features, trezor tests 2019-03-05 14:02:45 +01:00
Doyle 31dee01633 Merge branch 'dev' into IntegrationTestFramework 2019-02-12 11:56:12 +11:00
Doyle 1ad7658c77
Developer build target and minor static analysis (#409)
* Faster build target for development, some static analysis fixes

* Avoid linking wallet_rpc_server in dev build
2019-02-07 12:14:00 +11:00
doy-lee 37260e5540 Add build target for integration binaries 2019-02-05 15:13:36 +11:00
doy-lee af0c9b8e6c Merge commit '4cbb476' into LokiMergeUpstream 2018-10-31 17:41:45 +11:00
doy-lee acac1e70ac Merge commit '1c91963' into LokiMergeUpstream 2018-10-31 16:42:12 +11:00
Riccardo Spagni e5f2d982e9
Merge pull request #4607
e623f2b2 Add building with depends to the Makefile (TheCharlatan)
2018-10-26 22:36:36 +02:00
moneromooo-monero 9168fc9f78
Makefile: fix building without a git tree 2018-10-24 14:44:04 +00:00
TheCharlatan e623f2b225 Add building with depends to the Makefile
Depends can now be compiled with `make depends target=$triple`, where
$triple is one of the supported build targets.

Adapt the Makefile for this change, remove not needed windows deps from
depends setup description.
2018-10-16 03:39:17 +02:00
doy-lee 339f96b0cc Merge commit 'c23b6f8' into LokiMergeUpstreamUntil_20181010_77e1ebf 2018-10-10 15:07:16 +11:00
doy-lee 2d3adf003b Merge commit '7addabc' into LokiMergeUpstreamUntil_20180911_e6d36c1 2018-10-10 10:30:31 +11:00
Gregory Lemercier 02c2b43a72 Utils: Add Dockerfile for android 64-bit build 2018-10-09 15:58:18 +02:00
doy-lee 68b5ffc537 Merge commit 'fad88e1' into LokiMergeUpstream20180821 2018-09-28 16:57:00 +10:00
cslashm b4679f37f4 One build directory per branch/arch.
This proposal allows to perform multiple compilation from different branch/arch in
separate directories.
Example:

    build
    ├── GNU_Linux
    │   ├── multi-compilation
    │   │   └── release
    │   └── NanoS-USBHID
    │       └── release
    └── Msys
        └── NanoS-USBHID
            └── release

Edit 1:

Try to handle special char as : / \ .

--data-dir in unit test not yet tested

Edit 2:

donot use param for uname. -o is not supported by MacOS.
2018-09-13 17:36:31 +02:00
MoroccanMalinois fa814af969
Build: Fix target release-static-android 2018-08-21 23:25:14 +00:00
Doyle T 97b4ed900b Merge commit '13d73d9' into LokiMergeUpstream 2018-08-17 11:47:44 +10:00
jcktm dbe25f7a57 tests: change MAKE_TX test macros to use ring ct and bulletproofs; begin preparations for service node tests 2018-08-10 14:29:51 +10:00
philkode 14f0d38cd6
Incorporate Window debug build targets 2018-05-31 10:49:24 +01:00
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
Riccardo Spagni 4b156c003b
Merge pull request #2611
cdd516fa tests : remove lib_wallet_api tests (guzzijones)
2017-12-25 22:49:07 +02:00
moneromooo-monero 1a379ef656
fuzz_testing: build with ASAN (assumed to be available) 2017-12-23 11:27:34 +00:00
moneromooo-monero c27d909239
Makefile: build fuzz tests statically, starts faster 2017-12-23 11:27:28 +00:00
guzzijones cdd516fae3 tests : remove lib_wallet_api tests 2017-12-22 20:52:22 +00:00
Erik de Castro Lopo 94dd5cb4a0 Makefile: Add debug-static-all target
Also make debug-all target statically link all internal libraries.
2017-07-30 09:19:39 +10:00
moneromooo-monero 841231e5bd
Add fuzz testing using american fuzzy lop
Existing tests: block, transaction, signature, cold outputs,
cold transaction.

Data for these is in tests/data/fuzz.

A convenience shell script is in contrib/fuzz_testing/fuzz.sh, eg:

contrib/fuzz_testing/fuzz.sh signature

The fuzzer will run indefinitely, ^C to stop.

Fuzzing is currently supported for GCC only. I can't get CLANG
to build Monero here as it dies on some system headers, so if
someone wants to make it work on both, that'd be great.
In particular, the __AFL_LOOP construct should be made to work
so that a given run can fuzz multiple inputs, as the C++ load
time is substantial.
2017-06-24 16:46:18 +01:00
MoroccanMalinois 032fd3543d
Makefile add missing space for target android 2017-02-24 04:21:32 +00:00
Riccardo Spagni 27b477f68d
update last few copyright year references 2017-02-22 09:55:06 +02:00
moneromooo-monero 13cd544de3
Makefile: fix copy/paste mistake in targets (s/freebsd/mac) 2017-02-21 10:25:58 +00:00
moneromooo-monero f640512c53
Optionally query moneropulse DNS records to check for updates
It just checks and prints a message if there is a new version
for now.
2017-02-20 22:58:16 +00:00
moneromooo-monero e389bd9e60
Makefile: remove mistakenly added local custom target 2017-01-16 08:49:28 +00:00
moneromooo-monero 5833d66f65
Change logging to easylogging++
This replaces the epee and data_loggers logging systems with
a single one, and also adds filename:line and explicit severity
levels. Categories may be defined, and logging severity set
by category (or set of categories). epee style 0-4 log level
maps to a sensible severity configuration. Log files now also
rotate when reaching 100 MB.

To select which logs to output, use the MONERO_LOGS environment
variable, with a comma separated list of categories (globs are
supported), with their requested severity level after a colon.
If a log matches more than one such setting, the last one in
the configuration string applies. A few examples:

This one is (mostly) silent, only outputting fatal errors:

MONERO_LOGS=*:FATAL

This one is very verbose:

MONERO_LOGS=*:TRACE

This one is totally silent (logwise):

MONERO_LOGS=""

This one outputs all errors and warnings, except for the
"verify" category, which prints just fatal errors (the verify
category is used for logs about incoming transactions and
blocks, and it is expected that some/many will fail to verify,
hence we don't want the spam):

MONERO_LOGS=*:WARNING,verify:FATAL

Log levels are, in decreasing order of priority:
FATAL, ERROR, WARNING, INFO, DEBUG, TRACE

Subcategories may be added using prefixes and globs. This
example will output net.p2p logs at the TRACE level, but all
other net* logs only at INFO:

MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE

Logs which are intended for the user (which Monero was using
a lot through epee, but really isn't a nice way to go things)
should use the "global" category. There are a few helper macros
for using this category, eg: MGINFO("this shows up by default")
or MGINFO_RED("this is red"), to try to keep a similar look
and feel for now.

Existing epee log macros still exist, and map to the new log
levels, but since they're used as a "user facing" UI element
as much as a logging system, they often don't map well to log
severities (ie, a log level 0 log may be an error, or may be
something we want the user to see, such as an important info).
In those cases, I tried to use the new macros. In other cases,
I left the existing macros in. When modifying logs, it is
probably best to switch to the new macros with explicit levels.

The --log-level options and set_log commands now also accept
category settings, in addition to the epee style log levels.
2017-01-16 00:25:46 +00:00
MoroccanMalinois 80abc3bc4a Build wallet with Android NDK 2017-01-05 01:11:05 +00:00
NanoAkron 54c9400fbe
Changed ARM6/7/8 to ARMv6/7/8 to be nice to peronero 2016-10-27 23:22:07 +01:00
redfish e374ae7eeb cmake: option+target for profiling for coverage 2016-09-01 10:47:43 -04:00