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:WHICH_CMAKE=`which cmake`
OKAY Build is successful (<build duration>)sudo mv "${WHICH_CMAKE}" "${WHICH_CMAKE}.broken"
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 theFAILED The `cmake` command is required to run `arc build`. Please
first run duration,install CMake (https://cmake.org) they should be close.n run `arc build` again.
```
arc build --dir=buildcmake2
Should output:sudo mv "${WHICH_CMAKE}.broken" "${WHICH_CMAKE}"
OKAY Build is successful (<build duration>)WHICH_NINJA=`which ninja`
Check a `buildcmake2` folder has been created under the project root, sudo mv "${WHICH_NINJA}" "${WHICH_NINJA}.broken"
which contains the build file.
arc build --dir=</absolute/path/to/project/root/buildcmake3>
Should output:
OKAY Buil```
FAILED The `ninja` command is successful (<required to run `arc build duration>)d`. Please
Check a `buildcmake3` folder has been created under the project root,install Ninja (https://ninja-build.org) hen run `arc build` again.
which contains the build file.```
arc build --dir=buildcmake2 --post-clean
Should output:sudo mv "${WHICH_NINJA}.broken" "${WHICH_NINJA}"
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:mv .arcbuild .arcbuild.bak
OKAY Build is successful (<build duration>)
Check the `arc buildcmake3/src/test/test_bitcoin` binary exists.
```
arc build --dir=buildcmake3 --clear-cache --post-clean all test_bitcoinShould output:
```
Should output:FAILED Unable to find the `.arcbuild` configuration file. Please create
OKAY Build is successful (<build duration>)the file at the root of the project.
Check the `buildcmake3` folder has been deleted after the build.```
cd </path/to/project/root>mv .arcbuild.bak .arcbuild
chmod -w .sed -i "s/build/dliub/g" .arcbuild
arc build --dir=buildcmake2
Should output:
```
FAILED Unable to create the No build directory:
</path/to/project/root/buildcmake2> is configured. CheckSet the permissions and run `arc`build_directory`
option in your `.arcbuild` configuration file and run `arc build` again.
```
chmod +w .sed -i "s/dliub/build\"/g" .arcbuild
arc build --dir=buildcmake2
Should output:
OKAY Build is successful (<build duration>)```
Check a `buildcmake2` folder has been created under the project root,FAILED The `.arcbuild` file is not a valid JSON file, please check for
which contains the build file.syntax errors.
```
Note: the `chattr` command will not run on WSL sed -i "s/build\"/build/g" .arcbuild
sudo chattr +imkdir buildcmake2/CMakeCache.txt-arcanist
arc build --dir=buildcmake2 --clear-cachechmod -w .
arc build
Should output:
```
FAILED Unable to remove the The build directory </path/to/build-arcanist> already exists and
</path/to/project/root/buildcmake2/CMakeCache.txt> filecannot be deleted. CPlease check the permissions and run `arcor delete it manually
build --clear-cachethen run `arc build` again.
```
arc build --dir= chmod +w .
rm -rf buildcmake2 --post-clean-arcanist
chmod -w .
arc build
Should output:
```
FAILED Unable to delecreate the build directory:
</path/to/project/root/home/fabien/bitcoin-abc/buildcmake2>-arcanist. Check the permissions and run `arcyou have write
build --post-cleanpermissions to the parent directory and run `arc build` again.
```
chmod +w .
Comment the line
include(AddCompilerFlags)
in the `src/CMakeLists.txt` file.
sudo chattr -i buildcmake2/CMakeCache.txt
arc build --dir=arc buildcmake2 --clear-cache
Should output:
FAILED CMakeBuild failed with error 1!
Uncomment the previously commented line.
Comment the line
#include "init.h"
in the `src/init.cpp` file.
arc build --dir=buildcmake2
Should output:
FAILED NinjaBuild failed with error 1!
Uncomment the previously commented line.
arc build --dir=buildcmake2 --post-cleantrace test_bitcoin
Should output:
OKAY Build is successful (<build duration>)
Check the `buildcmake2` folder has been deleted after the build.
Remove the line:
"build_directory": "build-cmake"
From the `.arcconfig` file (don't forget to remove the trailing `,` from
the previous line).
arc build
Should return:
```
FAILED No build directory is configured. Set the `build_directory`
option in you configuration file and run `arc build` again, or select
the build directory by using the `--dir` argument on the command line.
```
Reset the changes in the `.arcconfig` filein the trace that the `test_bitcoin` target is passed to `ninja`.