[LNT] r308565 - LNT API run roundtrips

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 14:03:30 PDT 2017


Yep, looking good now after updating the server.

> On Jul 20, 2017, at 2:01 PM, Chris Matthews <chris.matthews at apple.com> wrote:
> 
> Yep, I have not deployed it anywhere!
> 
> 
> 
>> On Jul 20, 2017, at 2:00 PM, Matthias Braun <mbraun at apple.com <mailto:mbraun at apple.com>> wrote:
>> 
>> Actually I think this is just our server running on an older revision.
>> 
>>> On Jul 20, 2017, at 1:47 PM, Matthias Braun <mbraun at apple.com <mailto:mbraun at apple.com>> wrote:
>>> 
>>> This is still incomplete:
>>> 
>>> $ lnt admin get-run 223476
>>> $ lnt checkformat run_223476.json
>>> ...
>>> Traceback (most recent call last):
>>>   File "/Users/mbraun/dev/lnt/lnt/util/ImportData.py", line 91, in import_and_report
>>>     success, run = ts.importDataFromDict(data, commit, config=db_config)
>>>   File "/Users/mbraun/dev/lnt/lnt/server/db/testsuitedb.py", line 937, in importDataFromDict
>>>     machine, inserted = self._getOrCreateMachine(data['machine'])
>>> KeyError: 'machine'
>>> 
>>> - Matthias
>>> 
>>>> On Jul 19, 2017, at 5:30 PM, Chris Matthews via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>>>> 
>>>> Fixed in r308570.
>>>> 
>>>>> On Jul 19, 2017, at 5:28 PM, Chris Matthews <chris.matthews at apple.com <mailto:chris.matthews at apple.com>> wrote:
>>>>> 
>>>>> Ah, thanks.  At least I checked 999 was not there!
>>>>> 
>>>>>> On Jul 19, 2017, at 5:22 PM, Matthias Braun <mbraun at apple.com <mailto:mbraun at apple.com>> wrote:
>>>>>> 
>>>>>>> 
>>>>>>> On Jul 19, 2017, at 5:09 PM, Chris Matthews via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>>>>>>> 
>>>>>>> Author: cmatthews
>>>>>>> Date: Wed Jul 19 17:09:11 2017
>>>>>>> New Revision: 308565
>>>>>>> 
>>>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=308565&view=rev <http://llvm.org/viewvc/llvm-project?rev=308565&view=rev>
>>>>>>> Log:
>>>>>>> LNT API run roundtrips
>>>>>>> 
>>>>>>> Allow LNT runs to be downloaded from the API in a format that they can
>>>>>>> be inserted back into the same or other LNT instances.  This can be used
>>>>>>> to move runs between LNT instances, or modify them.
>>>>>>> 
>>>>>>> I make some changes to the REST API to make the format closer to what we
>>>>>>> expect, then ignore some fields (like ID) when importing.
>>>>>>> 
>>>>>>> 
>>>>>>> Modified: lnt/trunk/tests/server/ui/test_api_modify.py
>>>>>>> URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/ui/test_api_modify.py?rev=308565&r1=308564&r2=308565&view=diff <http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/ui/test_api_modify.py?rev=308565&r1=308564&r2=308565&view=diff>
>>>>>>> ==============================================================================
>>>>>>> --- lnt/trunk/tests/server/ui/test_api_modify.py (original)
>>>>>>> +++ lnt/trunk/tests/server/ui/test_api_modify.py Wed Jul 19 17:09:11 2017
>>>>>>> @@ -62,7 +62,7 @@ class JSONAPIDeleteTester(unittest.TestC
>>>>>>>        client = self.client
>>>>>>> 
>>>>>>>        j = check_json(client, 'api/db_default/v4/nts/runs/1')
>>>>>>> -        sample_ids = [s['id'] for s in j['samples']]
>>>>>>> +        sample_ids = [s['id'] for s in j['tests']]
>>>>>>>        self.assertNotEqual(len(sample_ids), 0)
>>>>>>>        for sid in sample_ids:
>>>>>>>            resp = client.get('api/db_default/v4/nts/samples/{}'.format(sid))
>>>>>>> @@ -97,7 +97,9 @@ class JSONAPIDeleteTester(unittest.TestC
>>>>>>>        for run_id in run_ids:
>>>>>>>            resp = check_json(client,
>>>>>>>                              'api/db_default/v4/nts/runs/{}'.format(run_id))
>>>>>>> -            sample_ids.append([s['id'] for s in resp['samples']])
>>>>>>> +            import pprint
>>>>>>> +            pprint.pprint(resp['tests'])
>>>>>>> +            sample_ids.append([s['id'] for s in resp['tests']])
>>>>>>>        self.assertNotEqual(len(sample_ids), 0)
>>>>>>> 
>>>>>>>        resp = client.delete('api/db_default/v4/nts/machines/2')
>>>>>>> @@ -130,7 +132,7 @@ Deleted machine 2
>>>>>>>        """Check POST to /runs."""
>>>>>>>        client = self.client
>>>>>>> 
>>>>>>> -        resp = client.get('api/db_default/v4/nts/runs/5')
>>>>>>> +        resp = client.get('api/db_default/v4/nts/runs/999')
>>>>>>>        self.assertEqual(resp.status_code, 404)
>>>>>> This was intended to check that the particular run we are going to post didn't exist before posting... according to the later asserts, we should end up with runs/5 not runs/999.
>>>>> 
>>>> 
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170720/c22e50d0/attachment.html>


More information about the llvm-commits mailing list