Bug 1275409: remove remaining code in testing/taskcluster; r=wcosta

MozReview-Commit-ID: 3GrQ2cI9XFN

--HG--
extra : rebase_source : 54d46b53fb392afc22347394b39288b4c8d15e89
This commit is contained in:
Dustin J. Mitchell 2016-06-04 22:40:36 +00:00
Родитель 28dfa968a6
Коммит 815538a4d4
7 изменённых файлов: 0 добавлений и 117 удалений

Просмотреть файл

@ -1,28 +0,0 @@
Problems:
Not all tests work on all platforms
Many tests work on N+1 platforms
Goals:
Tests and builds should be loosely coupled (you probably need a build
but you don't always need a build!)
Workflows:
1. Try: decide upon a set of builds and tests from a matrix of checkboxes
2. Branch: decide upon a set of builds based on in tree configuration
(essentially a "fixed" version of try flags)
3. One off builds / One of tests (which require a build we created
earlier)
## Build tasks
No special logic needed but convention of generating artifacts should be followed!
## Test Tasks
Always need a build (and likely also need the tests.zip). Should know
what potential builds they can run on.

Просмотреть файл

@ -1,3 +0,0 @@
pystache == 0.5.4
PyYAML == 3.11
slugid == 1.0.6

Просмотреть файл

@ -1,19 +0,0 @@
import os
from setuptools import setup, find_packages
import sys
version = '0.0.0'
# dependencies
with open('requirements.txt') as f:
deps = f.read().splitlines()
setup(name='taskcluster_graph',
version=version,
description='',
classifiers=[],
keywords='mozilla',
license='MPL',
packages=['taskcluster_graph'],
install_requires=deps,
)

Просмотреть файл

Просмотреть файл

@ -1,28 +0,0 @@
import datetime
from from_now import value_of
def json_time_from_now(input_str, now=None):
'''
:param str input_str: Input string (see value of)
:param datetime now: Optionally set the definition of `now`
:returns: JSON string representation of time in future.
'''
if now is None:
now = datetime.date.fromordinal(1)
time = now + value_of(input_str)
# Sorta a big hack but the json schema validator for date does not like the
# ISO dates until 'Z' (for timezone) is added...
return time.isoformat() + 'Z'
def current_json_time():
'''
:returns: JSON string representation of the current time.
'''
return datetime.date.fromordinal(1).isoformat() + 'Z'
def slugid():
return 'abcdef123456'

Просмотреть файл

@ -1,20 +0,0 @@
from slugid import nice as slugid
class SlugidJar():
'''
Container of seen slugid's used to implement the as_slugid functionality
used in the task graph templates.
'''
def __init__(self):
self._names = {}
def __call__(self, name):
'''
So this object can easily be passed to mustache we allow it to be called
directly...
'''
if name in self._names:
return self._names[name];
self._names[name] = slugid()
return self._names[name]

Просмотреть файл

@ -1,19 +0,0 @@
import unittest
import mozunit
from datetime import datetime
from taskcluster_graph.slugidjar import SlugidJar
class SlugidJarTest(unittest.TestCase):
def test_slugidjar(self):
subject = SlugidJar()
self.assertEqual(subject('woot'), subject('woot'))
self.assertTrue(type(subject('woot')) is str)
other_jar = SlugidJar()
self.assertNotEqual(subject('woot'), other_jar('woot'))
if __name__ == '__main__':
mozunit.main()