summaryrefslogtreecommitdiff
path: root/allDemos.py
blob: d6dbcb3d305ef6484d9936bbd5d3c27f8d7c23c3 (plain)
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
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

import os, sys, imp

sys.path.append(os.path.join(os.path.dirname(__file__), "demoscript"))
from demoscript import *

demoGroups = []

subdirs = [ "cpp", "java", "cs", "py", "rb", "js"]

for d in subdirs:

    filename = os.path.abspath(os.path.join(os.path.dirname(__file__), d, "allDemos.py"))
    f = open(filename, "r")
    current_mod = imp.load_module("allDemos", f, filename, (".py", "r", imp.PY_SOURCE))
    f.close()

    demos = [ os.path.join(d, "demo", x) for x in current_mod.demos ]
    demoGroups.extend(demos)

Util.run(demoGroups, root=True)