Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
06381773
Commit
06381773
authored
Jan 29, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skeleton for testing libvlc
parent
4348289a
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
83 additions
and
1 deletion
+83
-1
test/NativeLibvlcTest.py
test/NativeLibvlcTest.py
+8
-0
test/PyMediaControlBaseTest.py
test/PyMediaControlBaseTest.py
+0
-0
test/PyMediaControlPlaylistTest.py
test/PyMediaControlPlaylistTest.py
+0
-0
test/PyMediaControlVariablesTest.py
test/PyMediaControlVariablesTest.py
+0
-0
test/native_libvlc/native_libvlc_test.c
test/native_libvlc/native_libvlc_test.c
+16
-0
test/pyunit.h
test/pyunit.h
+9
-0
test/setup.py
test/setup.py
+49
-0
test/test.sh
test/test.sh
+1
-1
No files found.
test/NativeLibvlcTest.py
0 → 100644
View file @
06381773
import
vlc
import
unittest
import
native_libvlc_test
class
NativeLibvlcTestCase
(
unittest
.
TestCase
):
def
testMe
(
self
):
native_libvlc_test
.
create_destroy
()
test/BaseTest.py
→
test/
PyMediaControl
BaseTest.py
View file @
06381773
File moved
test/PlaylistTest.py
→
test/P
yMediaControlP
laylistTest.py
View file @
06381773
File moved
test/VariablesTest.py
→
test/
PyMediaControl
VariablesTest.py
View file @
06381773
File moved
test/native_libvlc/native_libvlc_test.c
0 → 100644
View file @
06381773
#include "../pyunit.h"
static
PyObject
*
create_destroy
(
PyObject
*
self
,
PyObject
*
args
)
{
/* Test stuff here */
Py_INCREF
(
Py_None
);
return
Py_None
;
}
static
PyMethodDef
native_libvlc_test_methods
[]
=
{
DEF_METHOD
(
create_destroy
,
"Create and destroy"
)
{
NULL
,
NULL
,
0
,
NULL
}
};
DECLARE_MODULE
(
native_libvlc_test
)
test/pyunit.h
0 → 100644
View file @
06381773
#include <Python.h>
#define ASSERT( a, message ) if( !(a) ) { fprintf( stderr, "ASSERTION FAILED\n" ); PyErr_SetString( PyExc_AssertionError, message ); return NULL; }
#define DECLARE_MODULE( module ) PyMODINIT_FUNC init##module( void ) { \
Py_InitModule( #module, module##_methods ); \
}
#define DEF_METHOD( method, desc ) { #method, method, METH_VARARGS, desc},
test/setup.py
0 → 100644
View file @
06381773
from
distutils.core
import
setup
,
Extension
import
os
def
get_vlcconfig
():
vlcconfig
=
None
for
n
in
(
'vlc-config'
,
os
.
path
.
sep
.
join
(
(
'..'
,
'vlc-config'
))):
if
os
.
path
.
exists
(
n
):
vlcconfig
=
n
break
if
vlcconfig
is
None
:
print
"*** Warning *** Cannot find vlc-config"
elif
os
.
sys
.
platform
==
'win32'
:
# Win32 does not know how to invoke the shell itself.
vlcconfig
=
"sh %s"
%
vlcconfig
return
vlcconfig
def
get_cflags
():
vlcconfig
=
get_vlcconfig
()
if
vlcconfig
is
None
:
return
[]
else
:
cflags
=
os
.
popen
(
'%s --cflags'
%
vlcconfig
,
'r'
).
readline
().
rstrip
().
split
()
return
cflags
def
get_ldflags
():
vlcconfig
=
get_vlcconfig
()
if
vlcconfig
is
None
:
return
[]
else
:
os
.
environ
[
'top_builddir'
]
=
'..'
ldflags
=
[]
if
os
.
sys
.
platform
==
'darwin'
:
ldflags
=
"-read_only_relocs warning"
.
split
()
ldflags
.
extend
(
os
.
popen
(
'%s --libs vlc pic builtin'
%
vlcconfig
,
'r'
).
readline
().
rstrip
().
split
())
if
os
.
sys
.
platform
==
'darwin'
:
ldflags
.
append
(
'-lstdc++'
)
return
ldflags
# To compile in a local vlc tree
native_libvlc_test
=
Extension
(
'native_libvlc_test'
,
sources
=
[
'native_libvlc/native_libvlc_test.c'
],
include_dirs
=
[
'../include'
,
'../'
,
'/usr/win32/include'
],
extra_objects
=
[
'../lib/libvlc_pic.a'
],
extra_compile_args
=
get_cflags
(),
extra_link_args
=
[
'-L../..'
]
+
get_ldflags
(),
)
setup
(
name
=
'native_libvlc_test'
,
version
=
'1242'
,
ext_modules
=
[
native_libvlc_test
]
)
test/test.sh
View file @
06381773
...
@@ -2,6 +2,6 @@
...
@@ -2,6 +2,6 @@
# FIXME - Get real .so
# FIXME - Get real .so
cd
..
cd
..
export
PYTHONPATH
=
$PYTHONPATH
:bindings/python/build/lib.linux-i686-2.3
export
PYTHONPATH
=
$PYTHONPATH
:bindings/python/build/lib.linux-i686-2.3
:test/build/lib.linux-i686-2.3
python
test
/test.py
-v
python
test
/test.py
-v
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment