pijul_org / pijul

Improving code coverage

By blabla on November 16, 2018
This patch is not signed.
8w1qfmdgfwGCwQbNewPb7QXtswJsaZDaUzru14EAD6i56WqwhTPxHsbL9HYjtbvygTMmS8BtLA9dq4H1xy8LNvsN
This patch is in the following branches:
latest
master
testing
24
25





26
27

28
29


30
31
32

33
34
35
36
37
38

39
40
41
42
43

44
45
    REMOTE_DIR=$(pwd)/../remote
    mkdir -p $REMOTE_DIR
    # cd $REMOTE_DIR
    # cd $REMOTE_DIR
    # cd $REMOTE_DIR
    # pijul_uncovered init
    # cd $PIJUL_REPO_DIR/subdir

    export HOME=$HOME_BACKUP
    RUST_LOG=pijul=debug REMOTE_PIJUL="$PIJUL_EXE" pijul clone . localhost:$REMOTE_DIR/repo &> /tmp/log
    RUST_LOG=pijul=debug REMOTE_PIJUL="$PIJUL_EXE" pijul clone . localhost:$REMOTE_DIR &> /tmp/log

    diff $REMOTE_DIR/repo/a/file.txt a/file.txt
    diff $REMOTE_DIR/repo/b/file.txt b/file.txt
    diff $REMOTE_DIR/a/file.txt a/file.txt
    diff $REMOTE_DIR/b/file.txt b/file.txt

    cd $REMOTE_DIR/repo
    cd $REMOTE_DIR
    echo blabla >> a/file.txt
    pijul_uncovered record -a -n -A me -m "remote"

    cd $PIJUL_REPO_DIR/subdir
    REMOTE_PIJUL="$PIJUL_EXE" pijul pull -p 22 -a localhost:$REMOTE_DIR --set-default
    REMOTE_PIJUL="$PIJUL_EXE" pijul push -p 22 -a localhost:$REMOTE_DIR --set-default
    echo blibli >> a/file.txt
    pijul_uncovered key gen --signing --local
    pijul_uncovered record -a -n -A me -m 'blibli'
    REMOTE_PIJUL="$PIJUL_EXE" pijul push -p 22 -a

    cd $REMOTE_DIR/repo
    cd $REMOTE_DIR
    echo blibli >> a/file.txt
In file shell.nix

1
2
3
4
5
6
7
8
9
10
11
12
13
14

15



16
17
18
19
    libsodium pkgconfig openssl
with import <nixpkgs> {};

let src = fetchFromGitHub {
      owner = "mozilla";
      repo = "nixpkgs-mozilla";
      rev = "e37160aaf4de5c4968378e7ce6fe5212f4be239f";
      sha256 = "013hapfp76s87wiwyc02mzq1mbva2akqxyh37p27ngqiz0kq5f2n";
   };
in
with import "${src.out}/rust-overlay.nix" pkgs pkgs;

clangStdenv.mkDerivation {
  name = "rust-pijul";
  buildInputs = [
    # (rustChannelOf { date = "2018-05-10"; channel="stable"; })
    rustChannels.stable.rust
    libsodium pkgconfig openssl
    # for tests
    kcov parallel
    parallel kcov
    python3Packages.httpserver
    libsodium pkgconfig openssl nettle
  ];