File: atheist.ice

package info (click to toggle)
atheist 0.20110402-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 1,348 kB
  • sloc: python: 4,764; xml: 626; makefile: 113; cpp: 54; ansic: 5; sh: 5
file content (80 lines) | stat: -rw-r--r-- 1,616 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// -*- mode: c++; coding: utf-8 -*-

#include <Ice/BuiltinSequences.ice>

module Atheist {

  enum Status {FAIL, OK, NOEXEC, ERR, UNKNOWN, RUNNING, TODO};

  dictionary<string, Status> StatusDict;

  struct TaskStatus {
    Status value;
    StatusDict conditions;
  };

  dictionary<string, TaskStatus> TaskStatusDict;

  struct TaskConfig {
    int    indx;
    string tid;
    bool   ckeck;
    string cwd;
    int    delay;
    string desc;
    bool   detach;
    //    dict   env;
    int    expected;
    bool   mustFail;
    string path;
    int    timeout;
    //    bool   saveStdout;
    //    bool   shell;
    int    signal;
    string stdout;
    Status value;
    long   age;
  };

  dictionary<string, TaskConfig> TaskConfigDict;

  interface TaskCase {
    void run();
    TaskConfigDict getConfig();
    StatusDict getStatus();
  };

  sequence<TaskCase*> TaskCaseSeq;

  interface StatusObserver {
    void updateTasks(StatusDict val);
    void updateTaskCases(StatusDict val);
    void updateManager(Status val);
  };

  interface OutObserver {
    void append(string taskID, string val);
  };

  enum LogLevel {CRITICAL, ERROR, WARNING, INFO, DEBUG};

  struct LogEntry {
    LogLevel level;
    int time;
    string msg;
  };

  sequence<LogEntry> LogEntrySeq;

  interface LogObserver {
    void append(string taskID, LogEntrySeq val);
  };

  interface Manager {
    TaskCaseSeq getTaskCases();
    void runAll();
    void attachStatusOb(StatusObserver* ob);
    void attachOutOb(OutObserver* ob, Ice::StringSeq taskIds);
    void attachLogOb(LogObserver* ob, Ice::StringSeq taskIds);
  };
};