コード例 #1
0
//this module just init for creat files to show which version
static int prjVersion_read_proc(struct file *file, char __user *buf, 
		size_t count,loff_t *off)
{
	char page[256] = {0};
	int len = 0;
	
	#if 0
	unsigned char operator_version;

	operator_version = get_Operator_Version();
	if(is_project(OPPO_14005)){
		if(operator_version == 3)
			len = sprintf(page,"%d",14006);
		else 
			len = sprintf(page,"%d",14005);
    }
	else if(is_project(OPPO_14023)){
		if(operator_version == 3)
			len = sprintf(page,"%d",14023);
		else 
			len = sprintf(page,"%d",14023);
    }
	else if(is_project(OPPO_14045)){
        //#ifdef VENDOR_EDIT
        //[email protected], 2014-08-07 add for EXP to mark 14085
		if(operator_version == 3 || 5 == operator_version || 6 == operator_version || 7 == operator_version)
        //#endif VENDOR_EDIT
			len = sprintf(page,"%d",14046);
		else if(operator_version == 4)
			len = sprintf(page,"%d",14047);
		else 
			len = sprintf(page,"%d",14045);
    }
	else
	{
		len = sprintf(page,"%d",get_project());
	}
	#else
	len = sprintf(page,"%d",get_project());
	#endif

	if(len > *off)
		len -= *off;
	else
		len = 0;
	
	if(copy_to_user(buf,page,(len < count ? len : count))){
		return -EFAULT;
	}
	*off += len < count ? len : count;
	return (len < count ? len : count);
}
コード例 #2
0
void testing_compile_base_meta_target::instantiate_impl(instantiation_context& ctx,
                                                        const main_target* owner,
                                                        const feature_set& build_request,
                                                        std::vector<basic_target*>* result,
                                                        feature_set* usage_requirements) const
{
   auto* suite = find_suite(get_project(), ctx);
   if (!suite) {
      typed_meta_target::instantiate_impl(ctx, owner, build_request, result, usage_requirements);
      return;
   }

   // we need to add <use> feature for sources found in testing.suite common-sources
   feature_set& new_build_request = *build_request.clone();
   for (const source_decl s : suite->common_sources()) {
      feature* source = get_engine().feature_registry().create_feature("use", "");
      source->set_dependency_data(s, &get_project());
      new_build_request.join(source);
   }

   typed_meta_target::instantiate_impl(ctx, owner, new_build_request, result, usage_requirements);
}
コード例 #3
0
TestFixtureBase::TestFixtureBase()
    : m_project(get_project())
    , m_scene(*get_project().get_scene())
    , m_assembly(*get_project().get_scene()->assemblies().get_by_name("assembly"))
{
}
コード例 #4
0
unsigned int is_project(OPPO_PROJECT project )
{
	return (get_project() == project?1:0);
}