Commit graph

106 commits

Author SHA1 Message Date
Felix Schurk
82e0d53cdf
add ctest as test driver (#3446) 2024-05-10 01:20:54 +00:00
Dustin J. Mitchell
8aa4758993
add targets for individual tests (#3431) 2024-05-03 10:06:29 -04:00
Dustin J. Mitchell
94b3e301d1
Remove taskchampion source from this repo (#3427)
* move taskchampion-lib to src/tc/lib, remove the rest
* update references to taskchampion
* Use a top-level Cargo.toml so everything is consistent
* apply comments from ryneeverett
2024-05-02 02:45:11 +00:00
mattsmida
ef9613e2d6
Renaming test files according to their language (#3407) 2024-05-01 14:28:07 -04:00
Felix Schurk
d093ce3d84
Fix test script paths (#3387)
* fix path to task executable in pyton tests

The current approach would copy the current files into the `build/test`
directory. Updating the paths according to the custom user setup.

By the copy I appended `.py` to have a clear visible distingtion which
ones are the python tests.

As soon as a source file in the normal directory is changed, it is
copied over and the corresponding file is updated.

From now on the python tests would need to get run in the according
build directory.

* reflect the current build instruction in PR template

* update paths and globing in run_all

* add line break for every cpp test

* remove .gitignore in test folder

As now all the auxillary files such as `all.log` as well as the
executables are present in the `build` directory there is no longer a
need to ignore them.

* update paths in python test scripts and enable deactivated

* remove .py extension when copy to build

Further remove glob pattern for `*.t.py` tests.

* remove accidentally added template.t from test files
2024-04-28 15:38:14 -04:00
Dustin J. Mitchell
18a8bd2997
Use corrosion instead of CMakeRust (#3273)
* Use corrosion instead of CMakeRust
* use OpenSUSE tumbleweed (latest) to get newer CMake
2024-03-02 16:21:34 -05:00
Dustin J. Mitchell
9566c929e2
Add support for cloud sync, specifically GCP (#3223)
* Add support for cloud sync, specifically GCP

This adds generic support for sync to cloud services, with specific
spuport for GCP. Adding others -- so long as they support a
compare-and-set operation -- should be comparatively straightforward.

The cloud support includes cleanup of unnecessary data, and should keep
total space usage roughly proportional to the number of tasks.

Co-authored-by: ryneeverett <ryneeverett@gmail.com>
2024-01-21 12:36:37 -05:00
Dathan Bennett
a7bb0c9ba0
Link executables using system frameworks on Darwin (#3075)
* Link test executables using system frameworks on Darwin

On an M1 MBP, running `cmake . && make test` yields the error

```
[ 69%] Linking CXX executable tc.t
Undefined symbols for architecture arm64:
  "_CFRelease", referenced from:
      _$LT$iana_time_zone..platform..system_time_zone..SystemTimeZone$u20$as$u20$core..ops..drop..Drop$GT$::drop::hcd3964de9573de30 in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.15.rcgu.o)
  "_CFStringGetBytes", referenced from:
      iana_time_zone::platform::string_ref::StringRef$LT$T$GT$::to_utf8::h39971b546d587152 in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.13.rcgu.o)
  "_CFStringGetCStringPtr", referenced from:
      iana_time_zone::platform::string_ref::StringRef$LT$T$GT$::as_utf8::h8bb5c2c0d091ded1 in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.13.rcgu.o)
  "_CFStringGetLength", referenced from:
      iana_time_zone::platform::string_ref::StringRef$LT$T$GT$::to_utf8::h39971b546d587152 in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.13.rcgu.o)
  "_CFTimeZoneCopySystem", referenced from:
      iana_time_zone::platform::system_time_zone::SystemTimeZone:🆕:hc42d30609914d79d in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.15.rcgu.o)
  "_CFTimeZoneGetName", referenced from:
      iana_time_zone::platform::system_time_zone::SystemTimeZone::name::h44947ee6deb3339a in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.15.rcgu.o)
  "_SecRandomCopyBytes", referenced from:
      ring::rand::darwin::fill::h0ad94d66d4e1a222 in libtc_rust.a(ring-e5f87a2e334d4c6a.ring.a21bac31-cgu.4.rcgu.o)
  "_kSecRandomDefault", referenced from:
      ring::rand::darwin::fill::h0ad94d66d4e1a222 in libtc_rust.a(ring-e5f87a2e334d4c6a.ring.a21bac31-cgu.4.rcgu.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [test/tc.t] Error 1
make[2]: *** [test/CMakeFiles/tc.t.dir/all] Error 2
make[1]: *** [test/CMakeFiles/test.dir/rule] Error 2
```

This change resolves the error by updating the targets in
test/CMakeLists.txt to link against the CoreFoundation and Security
frameworks when building under Mac OS.

* Link executables against CoreFoundation and Security frameworks on Mac OS

* Rename test_osx.sh to test_macos.sh

---------

Co-authored-by: Dathan Bennett <dathanb@netflix.com>
2023-07-20 17:23:12 -04:00
Dustin J. Mitchell
5bb9857984 Use Taskchampion to store Taskwarrior data
This replaces the TF2 task files with a TaskChampion replica.
2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
12ecfa2b1e rename rust/ to taskchampion/ 2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
8c30400af3 Add a C++ wrapper around TC FFI
This uses CMake to build a simple Rust library (in `src/tc/rust`) that
just re-exports everything from the `taskchampion-lib` crate.

The C++ wrappers then wrap this into C++ objects with proper lifecycle
maintenance, in the `tc` namespace.

The C++ wrappers are incomplete, and missing methods are tagged with
"TODO".  These will be added as needed.
2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
28e268bd26 fix parsing invalid depends from server
The data from the server is read via Task::parseJSON, not Task::parse.

This also reverts the tests for Task::parse, and adds new tests for this
specific issue.
2022-01-19 19:34:45 -05:00
Paul Beckingham
fb97883bef Build: Do not set CMP0037 on CMake 3.11.0 and above
- This policy is no longer necessary because CMake issue #16062, which caused
  incorrect warnings to be shown, has been resolved in 3.11.0.
- Thanks to Janik Rabe
2019-04-26 20:45:46 -04:00
Tomas Babej
a071694324 test: Workaround the cyclic dependencies between the libraries 2019-02-07 08:37:59 -05:00
Paul Beckingham
53088dae65 Build: C++14 support added 2018-05-14 00:53:32 -04:00
Paul Beckingham
d5a7769b4f Tests: Added first DOM test 2018-05-13 23:18:17 -04:00
Paul Beckingham
6009e20aa4 Tests: Named date tests migrated to libshared 2018-05-13 22:58:25 -04:00
Paul Beckingham
f2483538d2 Tests: Removed unused Nibbler tests 2018-05-13 22:54:58 -04:00
Paul Beckingham
c5f5b4a1f0 Tests: Eliminated ISO8601d tests 2018-05-13 22:53:10 -04:00
Paul Beckingham
c488e1d45c Tests: Eliminated ISO8601p tests 2018-05-13 22:52:31 -04:00
Paul Beckingham
b57a734625 Config: Migrated to libshared Configuration 2018-05-13 22:43:33 -04:00
Paul Beckingham
728390b6e5 Color: Now uses libshared 2018-05-13 22:22:41 -04:00
Paul Beckingham
c571f6b4fb Msg: Migrated to use libshared 2018-05-13 20:32:56 -04:00
Paul Beckingham
026a8aa9a1 Tests: Eliminated empty text.t test 2018-05-13 20:31:26 -04:00
Paul Beckingham
8462120c0a Tests: Removed migrated autoComplete tests 2018-05-13 20:29:14 -04:00
Paul Beckingham
555dc98f5b Tests: Removed redundant FS tests 2018-05-13 20:04:55 -04:00
Paul Beckingham
d0251642bc Tests: Removed redundant utf8 tests 2018-05-13 20:02:56 -04:00
Paul Beckingham
9a63bd5d6f Tests: Removed redundant listt tests 2018-05-13 20:02:03 -04:00
Paul Beckingham
a7900205e5 Tests: Removed redundant format tests 2018-05-13 20:01:45 -04:00
Paul Beckingham
dbb22f506d Tests: Removed JSON tests 2018-05-13 20:01:27 -04:00
Paul Beckingham
db182f4612 Tests: Removed RX tests 2018-05-13 19:59:09 -04:00
Paul Beckingham
4395818e72 CMake: Added snotty comment about CMake bullshit 2018-05-13 19:44:41 -04:00
Paul Beckingham
9b5c0c81a3 Build: Included 'problems' script in build dir
- Thanks to Gordon Ball.
2016-02-06 12:08:31 -05:00
Paul Beckingham
acca829aed Test: Merged t3.t.cpp into t.t.cpp 2015-10-23 10:19:17 -04:00
Paul Beckingham
bb58b796fd Task Data Parsing
- Improved the handling when parsing blank lines and empty task in the data, so
  that instead of the message:

    Taskwarrior no longer supports file format 1, originally used between 27
    November 2006 and 31 December 2007.

  We now see:

    Unrecognized Taskwarrior file format or blank line in data.

- Merged t2.t.cpp into t.t.cpp.
2015-10-23 10:13:38 -04:00
Paul Beckingham
799e62051f Test: Removed Date 2015-10-05 09:54:54 -04:00
Paul Beckingham
f97e68f1d6 Build: Ensured 'run_all' is present in the test dir
- Thanks to Gordon Ball.
2015-09-19 12:48:32 -04:00
Paul Beckingham
565232eccd Duration: Obsolete, removed 2015-08-12 11:41:15 -04:00
Paul Beckingham
ff53919af1 TW-1543: cmake complains "test" is not a valid target (on arch linux)
- Thanks to Renato Alves.
2015-07-19 17:29:23 -04:00
Paul Beckingham
3619cf219d Test: Added col.t to test Column::measure 2015-07-18 14:11:14 -04:00
Paul Beckingham
6f38d531a1 Test: Removed obsolete 'run_all' processing 2015-06-25 23:39:42 -04:00
Renato Alves
03847ab8ba Test: run_all is now in Python and defaults to parallelizing tests
In addition to the conversion to Python, run_all now defaults to running
all Python tests in parallel, using the same approach previously
available via '--fast'. If desired one can force all tests to run
serially by calling run_all with --serial

A debugging flag was now also included in run_all.  Pass one or more -l
(-l, -ll or -lll) for different levels of debugging information.
2015-06-25 23:36:28 +01:00
Paul Beckingham
afa39de68b Tests: Combined and converted DOM unit tests
- Eliminated dom.t.cpp and therefore dom.t
- Eliminated dom.2.t (perl)
- Created dom.t (python) combining the above
2015-06-14 22:15:33 -04:00
Paul Beckingham
3e043291f0 Cleanup: Combined File, Path and Directory into FS
- The three objects are related and always travel together, so they are now
  combined.
2015-05-25 10:11:41 -04:00
Paul Beckingham
70c3d9845c Unіt Tests
- Merged width.t.cpp into utf8.t.cpp.
2015-03-07 11:59:37 -05:00
Paul Beckingham
6d75045658 Tree
- Eliminated Tree object from the repository.
2014-11-02 22:30:21 -05:00
Paul Beckingham
f585f31d69 OldDuration
- Removed obsolete OldDuration object, replaced by Duration.
2014-05-28 23:59:16 -04:00
Paul Beckingham
c9f6a4b9df Unit Tests
- Added Variant::operator_partial unit tests, based initially on
  ::operator==.
2014-05-19 20:15:32 -04:00
Paul Beckingham
8b736934d7 Code Cleanup
- Removed deprecated 'push', 'pull' and 'merge' commands.
2014-01-18 19:12:48 -05:00
Paul Beckingham
98f740e9d1 Merge branch '2.3.0' into 2.4.0
Conflicts:
	AUTHORS
	CMakeLists.txt
	NEWS
	src/A3.cpp
	src/CMakeLists.txt
	src/Config.cpp
	src/Duration.cpp
	src/Duration.h
	src/Nibbler.cpp
	src/Nibbler.h
	src/RX.cpp
	src/RX.h
	src/columns/ColDate.cpp
	src/columns/ColScheduled.cpp
	src/commands/Command.cpp
	src/legacy.cpp
	src/utf8.cpp
	src/utf8.h
	test/CMakeLists.txt
	test/bug.mergedeps.t.postponed
	test/duration.t.cpp
	test/merge.duplicates.t
	test/merge.simple_duplication.t
	test/merge.t
	test/nibbler.t.cpp
	test/roundtrip.t
	test/rx.t.cpp
	test/utf8.t.cpp
2014-01-07 19:10:03 -05:00