Initial state: a clean project tree.
arc build
Should output:
OKAY Build is successful (<build duration>)
Check a `buildcmake` folder has been created under the project root,
which contains the build file.
arc build
Should output:
OKAY Build is successful (<build duration>)
The displayed duration should be much shorted as the build directory
already exists.
arc build --clear-cache --trace
Should output:
OKAY Build is successful (<build duration>)
Check in the trace that CMake rerun by comparing its duration to the
first run duration, they should be close.
arc build --dir=buildcmake2
Should output:
OKAY Build is successful (<build duration>)
Check a `buildcmake2` folder has been created under the project root,
which contains the build file.
arc build --dir=</absolute/path/to/project/root/buildcmake3>
Should output:
OKAY Build is successful (<build duration>)
Check a `buildcmake3` folder has been created under the project root,
which contains the build file.
arc build --dir=buildcmake2 --post-clean
Should output:
OKAY Build is successful (<build duration>)
Check the `buildcmake2` folder has been deleted after the build.
arc build --dir=buildcmake3 test_bitcoin --trace
Should output:
OKAY Build is successful (<build duration>)
Check the `buildcmake3/src/test/test_bitcoin` binary exists.
```
arc build --dir=buildcmake3 --clear-cache --post-clean all test_bitcoin
```
Should output:
OKAY Build is successful (<build duration>)
Check the `buildcmake3` folder has been deleted after the build.
cd </path/to/project/root>
chmod -w .
arc build --dir=buildcmake2
Should output:
```
FAILED Unable to create the build directory:
</path/to/project/root/buildcmake2>. Check the permissions and run `arc
build` again.
```
chmod +w .
arc build --dir=buildcmake2
Should output:
OKAY Build is successful (<build duration>)
Check a `buildcmake2` folder has been created under the project root,
which contains the build file.
sudo chattr +i buildcmake2/CMakeCache.txt
arc build --dir=buildcmake2 --clear-cache
Should output:
```
FAILED Unable to remove the
</path/to/project/root/buildcmake2/CMakeCache.txt> file. Check the permissions and run `arc
build --clear-cache` again.
```
arc build --dir=buildcmake2 --post-clean
Should output:
```
FAILED Unable to delete the build directory:
</path/to/project/root/buildcmake2>. Check the permissions and run `arc
build --post-clean` again.
```
Comment the line
include(AddCompilerFlags)
in the `src/CMakeLists.txt` file.
sudo chattr -i buildcmake2/CMakeCache.txt
arc build --dir=buildcmake2 --clear-cache
Should output:
FAILED CMake failed with error 1
Uncomment the previously commented line.
Comment the line
#include "init.h"
in the `src/ini.cpp` file.
arc build --dir=buildcmake2
Should output:
FAILED Ninja failed with error 1
Uncomment the previously commented line.
arc build --dir=buildcmake2 --post-clean
Should output:
OKAY Build is successful (<build duration>)
Check the `buildcmake2` folder has been deleted after the build.