From 4738a9035ce0c111cbb65e2b19361a331f14eda5 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 24 Feb 2022 05:15:28 +0200 Subject: [PATCH] test random config option every 10 CI builds Signed-off-by: Ivailo Monev --- appveyor.yml | 2 ++ scripts/cicount.py | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 scripts/cicount.py diff --git a/appveyor.yml b/appveyor.yml index acb6e4aa7..8bf914a7e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,6 +19,8 @@ build_script: export PATH="/usr/lib/ccache/:$PATH" + python ./scripts/cicount.py + cmake . -Wno-dev -DKATIE_TESTS=ON -DKATIE_BENCHMARKS=ON -DKATIE_UTILS=ON make -j $(nproc || echo 1) diff --git a/scripts/cicount.py b/scripts/cicount.py new file mode 100755 index 000000000..434e962d3 --- /dev/null +++ b/scripts/cicount.py @@ -0,0 +1,21 @@ +#!/usr/bin/python + +import os, sys + +cicountfile = "/home/appveyor/.ccache/cicount" + +cicount = 0 +try: + with open(cicountfile, 'r') as f: + cicontent = f.read() + cicount = int(cicontent) +except: + cicount = 10 + +if cicount >= 10: + import randconfig + cicount = 0 + +cicount += 1 +with open(cicountfile, 'w') as f: + f.write(str(cicount))