mirror of
https://github.com/lilydjwg/archrepo2.git
synced 2025-03-10 12:02:43 +00:00
test updated
This commit is contained in:
parent
686227b6f2
commit
ab48a6d810
2 changed files with 51 additions and 36 deletions
|
@ -1,51 +1,59 @@
|
|||
base_dir: /var/cache/pacman/pkg
|
||||
# wait for server to start
|
||||
wait
|
||||
|
||||
# i686 and x86_64 packages
|
||||
# x86_64 packages
|
||||
add: any zip-3.0-3-x86_64.pkg.tar.xz
|
||||
add: x86_64 zip-3.0-3-i686.pkg.tar.xz
|
||||
wait
|
||||
checky: x86_64/zip-3.0-3-x86_64.pkg.tar.xz
|
||||
checky: i686/zip-3.0-3-i686.pkg.tar.xz
|
||||
checkp: x86_64 zip=3.0-3
|
||||
checkp: i686 zip=3.0-3
|
||||
|
||||
# 'any' package
|
||||
add: i686 ydcv-0.3-1-any.pkg.tar.xz
|
||||
add: x86_64 youtube-dl-2014.01.28.1-1-any.pkg.tar.xz
|
||||
wait
|
||||
checky: any/ydcv-0.3-1-any.pkg.tar.xz
|
||||
checky: i686/ydcv-0.3-1-any.pkg.tar.xz
|
||||
checky: x86_64/ydcv-0.3-1-any.pkg.tar.xz
|
||||
checkp: x86_64 ydcv=0.3-1
|
||||
checkp: i686 ydcv=0.3-1
|
||||
checky: any/youtube-dl-2014.01.28.1-1-any.pkg.tar.xz
|
||||
checky: i686/youtube-dl-2014.01.28.1-1-any.pkg.tar.xz
|
||||
checky: x86_64/youtube-dl-2014.01.28.1-1-any.pkg.tar.xz
|
||||
checkp: x86_64 youtube-dl=2014.01.28.1-1
|
||||
checkp: i686 youtube-dl=2014.01.28.1-1
|
||||
|
||||
# update a package
|
||||
add: any ydcv-0.3.2-1-any.pkg.tar.xz
|
||||
add: any youtube-dl-2014.01.29-1-any.pkg.tar.xz
|
||||
wait
|
||||
checky: any/ydcv-0.3.2-1-any.pkg.tar.xz
|
||||
checky: i686/ydcv-0.3.2-1-any.pkg.tar.xz
|
||||
checky: x86_64/ydcv-0.3.2-1-any.pkg.tar.xz
|
||||
checkp: x86_64 ydcv=0.3.2-1
|
||||
checkp: i686 ydcv=0.3.2-1
|
||||
checky: any/youtube-dl-2014.01.29-1-any.pkg.tar.xz
|
||||
checky: i686/youtube-dl-2014.01.29-1-any.pkg.tar.xz
|
||||
checky: x86_64/youtube-dl-2014.01.29-1-any.pkg.tar.xz
|
||||
checkp: x86_64 youtube-dl=2014.01.29-1
|
||||
checkp: i686 youtube-dl=2014.01.29-1
|
||||
|
||||
# downgrade and remove
|
||||
add: i686 ydcv-0.3.1-1-any.pkg.tar.xz
|
||||
remove: any ydcv-0.3-1-any.pkg.tar.xz
|
||||
add: x86_64 youtube-dl-2014.01.29-1-any.pkg.tar.xz
|
||||
remove: any youtube-dl-2014.01.28.1-1-any.pkg.tar.xz
|
||||
wait
|
||||
checkn: any/ydcv-0.3-1-any.pkg.tar.xz
|
||||
checkn: i686/ydcv-0.3-1-any.pkg.tar.xz
|
||||
checkn: x86_64/ydcv-0.3-1-any.pkg.tar.xz
|
||||
checkp: x86_64 ydcv=0.3.1-1
|
||||
checkp: i686 ydcv=0.3.1-1
|
||||
checkn: any/youtube-dl-2014.01.28.1-1-any.pkg.tar.xz
|
||||
checkn: i686/youtube-dl-2014.01.28.1-1-any.pkg.tar.xz
|
||||
checkn: x86_64/youtube-dl-2014.01.28.1-1-any.pkg.tar.xz
|
||||
checkp: x86_64 youtube-dl=2014.01.29-1
|
||||
checkp: i686 youtube-dl=2014.01.29-1
|
||||
|
||||
# completely remove packages
|
||||
remove: any ydcv-0.3.1-1-any.pkg.tar.xz
|
||||
remove: i686 zip-3.0-3-i686.pkg.tar.xz
|
||||
remove: any youtube-dl-2014.01.29-1-any.pkg.tar.xz
|
||||
remove: x86_64 zip-3.0-3-x86_64.pkg.tar.xz
|
||||
wait
|
||||
checkn: any/ydcv-0.3.1-1-any.pkg.tar.xz
|
||||
checkn: i686/ydcv-0.3.1-1-any.pkg.tar.xz
|
||||
checkn: x86_64/ydcv-0.3.1-1-any.pkg.tar.xz
|
||||
checkp: x86_64 ydcv=null
|
||||
checkp: i686 ydcv=null
|
||||
checkp: any ydcv=null
|
||||
checkn: any/youtube-dl-2014.01.29-1-any.pkg.tar.xz
|
||||
checkn: i686/youtube-dl-2014.01.29-1-any.pkg.tar.xz
|
||||
checkn: x86_64/youtube-dl-2014.01.29-1-any.pkg.tar.xz
|
||||
checkp: x86_64 youtube-dl=null
|
||||
checkp: i686 youtube-dl=null
|
||||
checkp: any youtube-dl=null
|
||||
checkp: i686 zip=null
|
||||
checkp: x86_64 zip=3.0-3
|
||||
checkp: x86_64 zip=null
|
||||
|
||||
# add then, while adding, remove it
|
||||
# look at the log carefully!
|
||||
add: x86_64 linux-3.12.8-1-x86_64.pkg.tar.xz
|
||||
racing-wait
|
||||
remove: x86_64 linux-3.12.8-1-x86_64.pkg.tar.xz
|
||||
wait
|
||||
checkn: x86_64/linux-3.12.8-1-x86_64.pkg.tar.xz
|
||||
checkp: x86_64 linux=null
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
# vim:fileencoding=utf-8
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
@ -26,6 +25,13 @@ class WaitCommand(Command):
|
|||
logging.info('waiting for %d seconds...', t)
|
||||
time.sleep(t)
|
||||
|
||||
class RacingWaitCommand(Command):
|
||||
cmd = 'racing-wait'
|
||||
def run(self):
|
||||
t = self.ctx['wait_time'] + 0.3
|
||||
logging.info('Racing-waiting for %s seconds...', t)
|
||||
time.sleep(t)
|
||||
|
||||
class BaseDirCommand(Command):
|
||||
cmd = 'base_dir'
|
||||
def run(self):
|
||||
|
@ -110,6 +116,9 @@ def run_action_file(conf, actlines):
|
|||
cmd = cmd.rstrip(':')
|
||||
try:
|
||||
cmdmap[cmd](ctx, args)
|
||||
except KeyboardInterrupt:
|
||||
logging.info('Interrupted.')
|
||||
break
|
||||
except:
|
||||
logging.error('error running action: %s', l, exc_info=True)
|
||||
logging.info('done running action file.')
|
||||
|
@ -119,10 +128,8 @@ class Server:
|
|||
self.conffile = conffile
|
||||
|
||||
def start(self):
|
||||
server_path = os.path.join('.', os.path.normpath(os.path.join(__file__, '../../archreposrv')))
|
||||
logging.debug('server path: %s', server_path)
|
||||
logging.info('starting server...')
|
||||
self.p = subprocess.Popen([server_path, self.conffile])
|
||||
self.p = subprocess.Popen(['archreposrv', self.conffile])
|
||||
|
||||
def stop(self):
|
||||
logging.info('quitting server...')
|
||||
|
|
Loading…
Add table
Reference in a new issue