]> arthur.barton.de Git - bup.git/commitdiff
cirrus: fill out python 3 tests
authorRob Browning <rlb@defaultvalue.org>
Sat, 27 Jun 2020 15:26:54 +0000 (10:26 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 5 Jul 2020 16:16:23 +0000 (11:16 -0500)
Test python 3 on all platforms and to the same extent as python 2.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
.cirrus.yml
dev/prep-for-debianish-build
dev/prep-for-freebsd-build
dev/prep-for-macos-build

index 15d96ec32da17bc4646962e70ceeb325abd038c6..5a6057a13df29ba3352d7782961517344e77f85f 100644 (file)
 
 task:
-  name: debian (long)
+  name: debian (py2)
   container:
     image: debian:buster
-    cpu: 2
-    memory: 8
+    cpu: 4
+    memory: 2
   script: |
     set -xe
-    dev/prep-for-debianish-build
+    dev/prep-for-debianish-build python2
+    dev/system-info
+    eatmydata make -j6 PYTHON=python2 check
+
+task:
+  name: debian (long py2)
+  container:
+    image: debian:buster
+    cpu: 4
+    memory: 2
+  script: |
+    set -xe
+    dev/prep-for-debianish-build python2
+    dev/system-info
+    adduser --disabled-password --gecos '' bup
+    chown -R bup:bup .
+    su -l bup -c "eatmydata make -j6 -C '$(pwd)' PYTHON=python2 long-check"
+
+task:
+  name: debian (root py2)
+  container:
+    image: debian:buster
+    cpu: 4
+    memory: 2
+  script: |
+    set -xe
+    dev/prep-for-debianish-build python2
     dev/system-info
     adduser --disabled-password --gecos '' bup
     chown -R bup:bup .
-    su -l bup -c "eatmydata make -j3 -C '$(pwd)' long-check"
+    su -l bup -c "eatmydata make -j6 -C '$(pwd)' PYTHON=python2 check"
 
 task:
-  name: debian (root)
+  name: debian (py3)
   container:
     image: debian:buster
-    cpu: 2
-    memory: 8
+    cpu: 4
+    memory: 2
   script: |
     set -xe
-    dev/prep-for-debianish-build
+    dev/prep-for-debianish-build python3
     dev/system-info
-    eatmydata make -j3 check
+    eatmydata make -j6 PYTHON=python3 check
 
 task:
-  name: debian (xattr)
+  name: debian (long py3)
   container:
     image: debian:buster
-    cpu: 2
-    memory: 8
+    cpu: 4
+    memory: 2
   script: |
     set -xe
-    dev/prep-for-debianish-build python2 xattr
+    dev/prep-for-debianish-build python3
     dev/system-info
     adduser --disabled-password --gecos '' bup
     chown -R bup:bup .
-    su -l bup -c "eatmydata make -j3 -C '$(pwd)' check"
+    su -l bup -c "eatmydata make -j6 -C '$(pwd)' PYTHON=python3 long-check"
 
 task:
-  name: freebsd
+  name: debian (root py3)
+  container:
+    image: debian:buster
+    cpu: 4
+    memory: 2
+  script: |
+    set -xe
+    dev/prep-for-debianish-build python3
+    dev/system-info
+    adduser --disabled-password --gecos '' bup
+    chown -R bup:bup .
+    su -l bup -c "eatmydata make -j6 -C '$(pwd)' PYTHON=python3 check"
+
+task:
+  name: freebsd (py2)
   freebsd_instance:
     image: freebsd-12-1-release-amd64
-    cpu: 2
-    memory: 8
+    cpu: 4
+    memory: 4
   script: |
     set -xe
-    dev/prep-for-freebsd-build
+    dev/prep-for-freebsd-build python2
     dev/system-info
-    gmake -j3 check
+    gmake -j6 PYTHON=python2 check
     # It looks like su might not work here...
     #pw useradd -n bup -s /bin/sh -m -w no
     #chown -R bup .
     #su -l bup -c "gmake -j3 -C '$PWD' check"
 
 task:
-  name: macos
+  name: freebsd (py3)
+  freebsd_instance:
+    image: freebsd-12-1-release-amd64
+    cpu: 4
+    memory: 4
+  script: |
+    set -xe
+    dev/prep-for-freebsd-build python3
+    dev/system-info
+    gmake -j6 PYTHON=python3 check
+
+task:
+  name: macos (py2)
   osx_instance:
     image: mojave-xcode-10.2
   script: |
     set -xe
-    dev/prep-for-macos-build
+    dev/prep-for-macos-build python2
     export PKG_CONFIG_PATH=/usr/local/opt/readline/lib/pkgconfig
     dev/system-info
-    make -j3 check
+    make -j4 PYTHON=python2 check
 
 task:
-  name: debian (python 3 - under construction)
-  container:
-    image: debian:buster
-    cpu: 2
-    memory: 8
+  name: macos (py3)
+  osx_instance:
+    image: mojave-xcode-10.2
   script: |
     set -xe
-    dev/prep-for-debianish-build python3
+    dev/prep-for-macos-build python3
+    export PKG_CONFIG_PATH=/usr/local/opt/readline/lib/pkgconfig
+    export PYTHON=python3
     dev/system-info
-    adduser --disabled-password --gecos '' bup
-    chown -R bup:bup .
-    su -l bup -c "PYTHON=python3 eatmydata make -j3 -C '$(pwd)' check"
+    make -j4 PYTHON=python3 check
index 3141f5b1911bcc13383fa45cb6af505593b8b58c..a0b7a3de5e7c4c3709c5944c94f58e9bd3b1e37d 100755 (executable)
@@ -29,7 +29,7 @@ case "$pyver" in
     python3)
         apt-get install -y \
                 $common_debs \
-                python3.7-dev python3-distutils python3-fuse \
+                python3-dev python3-distutils python3-fuse \
                 python3-"$xattr" python3-tornado
         ;;
     *)
index e56425984ae0070f2d2ae87f3c5e1d8c978e09bd..609f8748df693873f3df5483df25db9c38a3a939 100755 (executable)
@@ -1,11 +1,30 @@
 #!/bin/sh
 
-set -ex
+set -exu
+
+usage()
+{
+    echo "Usage: prep-for-freebsd-build [python2|python3]"
+}
+
+common_pkgs='gmake git bash rsync curl par2cmdline readline duplicity'
+common_pkgs="$common_pkgs rdiff-backup rsnapshot"
+
+pyver="${1:-python2}"
 
 # Install build deps
 export ASSUME_ALWAYS_YES=yes
 pkg update
-pkg install \
-    gmake git bash rsync curl par2cmdline \
-    python2 python py27-tornado readline \
-    duplicity rdiff-backup rsnapshot
+
+case "$pyver" in
+    python2)
+        pkg install $common_pkgs python2 py27-tornado
+        ;;
+    python3)
+        pkg install $common_pkgs python3 py37-tornado
+        ;;
+    *)
+        usage 1>&2
+        exit 2
+        ;;
+esac
index 78ae3a50dc5af52ca5fe6e128cd4f8c81b126f1b..d79fd043abc45a0354e8fa60c6943b05907d7645 100755 (executable)
@@ -1,6 +1,13 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
-set -ex
+set -exu
+
+usage()
+{
+    echo "Usage: prep-for-macos-build [python2|python3]"
+}
+
+pyver="${1:-python2}"
 
 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
 
@@ -11,3 +18,12 @@ brew install par2 readline rsync pkg-config
 # won't actually be able to use the readline we just installed above.
 brew link --force readline
 # "brew unlink readline" will undo this hack
+
+case "$pyver" in
+    python2) ;;
+    python3) brew install python ;;
+    *)
+        usage 1>&2
+        exit 2
+        ;;
+esac