Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add script to test against latest PyPi packages

  • Loading branch information...
commit 2ff7d98b3eecdc25cdbcc806ca5aacfa600d2789 1 parent 3a662c5
myint authored

Showing 2 changed files with 51 additions and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  .gitignore
  2. +50 0 test/acid_pypi.bash
1  .gitignore
@@ -8,3 +8,4 @@ htmlcov
8 8 .tox
9 9 *.class
10 10 coverage.xml
  11 +test/pypi_tmp/
50 test/acid_pypi.bash
... ... @@ -0,0 +1,50 @@
  1 +#!/bin/bash
  2 +#
  3 +# Run acid test against latest packages on PyPi.
  4 +
  5 +# Check all packages released in the last $LAST_HOURS hours
  6 +LAST_HOURS=100
  7 +
  8 +# Assume we are running from the correct directory
  9 +ACID="$PWD/acid.py"
  10 +TMP_DIR="$PWD/pypi_tmp"
  11 +mkdir "$TMP_DIR"
  12 +
  13 +for package in $(yolk -C "$LAST_HOURS" | grep -v '^ ' | sed 's/ .*//')
  14 +do
  15 + echo
  16 + echo "$package"
  17 +
  18 + mkdir "$TMP_DIR/$package"
  19 + if [ $? -ne 0 ]
  20 + then
  21 + echo 'Skipping already checked package'
  22 + continue;
  23 + fi
  24 +
  25 + cd "$TMP_DIR/$package"
  26 +
  27 + yolk --fetch-package="$package"
  28 + if [ $? -ne 0 ]
  29 + then
  30 + echo 'ERROR: yolk failed'
  31 + continue;
  32 + fi
  33 +
  34 + tar xf "$package"*.tar.gz
  35 + if [ $? -ne 0 ]
  36 + then
  37 + unzip "$package"*.zip
  38 + if [ $? -ne 0 ]
  39 + then
  40 + echo 'ERROR: Both untar and unzip failed'
  41 + continue;
  42 + fi
  43 + fi
  44 +
  45 + "$ACID" "$TMP_DIR/$package"
  46 + if [ $? -ne 0 ]
  47 + then
  48 + break;
  49 + fi
  50 +done

0 comments on commit 2ff7d98

Please sign in to comment.
Something went wrong with that request. Please try again.