Initial state: a clean project tree.
arc build
Should output:
OKAY Build is successful (<build duration>)
WHICH_CMAKE=`which cmake`
sudo mv "${WHICH_CMAKE}" "${WHICH_CMAKE}.broken"
arc build
Should output:
```
FAILED The `cmake` command is required to run `arc build`. Please
install CMake (https://cmake.org) then run `arc build` again.
```
sudo mv "${WHICH_CMAKE}.broken" "${WHICH_CMAKE}"
WHICH_NINJA=`which ninja`
sudo mv "${WHICH_NINJA}" "${WHICH_NINJA}.broken"
arc build
Should output:
```
FAILED The `ninja` command is required to run `arc build`. Please
install Ninja (https://ninja-build.org) hen run `arc build` again.
```
sudo mv "${WHICH_NINJA}.broken" "${WHICH_NINJA}"
mv .arcbuild .arcbuild.bak
arc build
Should output:
```
FAILED Unable to find the `.arcbuild` configuration file. Please create
the file at the root of the project.
```
mv .arcbuild.bak .arcbuild
sed -i "s/build/dliub/g" .arcbuild
arc build
Should output:
```
FAILED No build directory is configured. Set the `build_directory`
option in your `.arcbuild` configuration file and run `arc build` again.
```
sed -i "s/dliub/build\"/g" .arcbuild
arc build
Should output:
```
FAILED The `.arcbuild` file is not a valid JSON file, please check for
syntax errors.
```
sed -i "s/build\"/build/g" .arcbuild
mkdir build-arcanist
chmod -w .
arc build
Should output:
```
FAILED The build directory </path/to/build-arcanist> already exists and
cannot be deleted. Please check the permissions or delete it manually
then run `arc build` again.
```
chmod +w .
rm -rf build-arcanist
chmod -w .
arc build
Should output:
```
FAILED Unable to create the build directory:
/home/fabien/bitcoin-abc/build-arcanist. Check you have write
permissions to the parent directory and run `arc build` again.
```
chmod +w .
Comment the line
include(AddCompilerFlags)
in the `src/CMakeLists.txt` file.
arc build
Should output:
FAILED Build failed !
Uncomment the previously commented line.
Comment the line
#include "init.h"
in the `src/init.cpp` file.
arc build
Should output:
FAILED Build failed !
Uncomment the previously commented line.
arc build --trace test_bitcoin
Should output:
OKAY Build is successful (<build duration>)
Check in the trace that the `test_bitcoin` target is passed to `ninja`.
Change the build directory in `.arcbuild` to your project root (try absolute, relative `""` and `"."` paths).
arc build
Should output:
```
FAILED The build directory is set to the project root: </path/to/project/root>. The directory is removed after the build, please set it to something else.
```